1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| Sub Procedure()
Dim Chaine_de_caracteres As String
Dim ZoneText As Shape 'Je ne suis pas tout à fait sûr
Set ZoneText = ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 380, 60, 180, 20)
With .TextFrame.Characters(Start:=1, Length:=longeur de la chaine).Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
ZoneText.ShapeRange.Fill.Visible = msoFalse
ZoneText.ShapeRange.Fill.Transparency = 0#
ZoneText.ShapeRange.Line.Weight = 0.75
ZoneText.ShapeRange.Line.DashStyle = msoLineSolid
ZoneText.ShapeRange.Line.Style = msoLineSingle
ZoneText.ShapeRange.Line.Transparency = 0#
ZoneText.ShapeRange.Line.Visible = msoFalse
With ZoneText
.Placement = xlFreeFloating 'Ne dépend pas des mouvements des cellules
.PrintObject = True
End With
End Sub |
Partager