wifithesniper
XLDnaute Nouveau
Bonjour,
Voici une macro qui permet d'afficher une bannière.
Elle fonctionne sous 2003 mais elle bloque sur le ReadingOrder sous 2010.
Voici le code :
Sub Banniere(Optional Txt)
If IsMissing(Txt) Then
msg = "Traitement en cours," & Chr(10) & "Merci de patienter," & Chr(10) & "Ne pas toucher..."
Else
msg = Txt
End If
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 200, 250, 280, 150).Select
With Selection
.Characters.Text = msg
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.ReadingOrder = xlContext
.Orientation = xlHorizontal
.AutoSize = True
.ShapeRange.Shadow.Type = msoShadow6
.ShapeRange.Fill.ForeColor.SchemeColor = 35
.ShapeRange.Fill.Visible = msoTrue
.ShapeRange.Fill.Solid
.Name = "Banniere"
With .Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Bold = True
End With
End With
End Sub
Merci d'avance pour vos réponses.
Cdlt,
Wifi
Voici une macro qui permet d'afficher une bannière.
Elle fonctionne sous 2003 mais elle bloque sur le ReadingOrder sous 2010.
Voici le code :
Sub Banniere(Optional Txt)
If IsMissing(Txt) Then
msg = "Traitement en cours," & Chr(10) & "Merci de patienter," & Chr(10) & "Ne pas toucher..."
Else
msg = Txt
End If
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 200, 250, 280, 150).Select
With Selection
.Characters.Text = msg
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.ReadingOrder = xlContext
.Orientation = xlHorizontal
.AutoSize = True
.ShapeRange.Shadow.Type = msoShadow6
.ShapeRange.Fill.ForeColor.SchemeColor = 35
.ShapeRange.Fill.Visible = msoTrue
.ShapeRange.Fill.Solid
.Name = "Banniere"
With .Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 20
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Bold = True
End With
End With
End Sub
Merci d'avance pour vos réponses.
Cdlt,
Wifi