I have this code, and is working all fine, but I am not sure as how to add more text box, I mean the code should add 30 text box.
Currently it is adding on 1 textbox. Any idea.
Currently it is adding on 1 textbox. Any idea.
VBA Code:
Sub DrawTextbox()
Dim ws As Worksheet, s As Shape
Set ws = ActiveSheet
ActiveWindow.SmallScroll up:=26
ActiveWindow.SmallScroll Down:=26
' Create label (height/width will be set by AutoSize).
Set s = ws.Shapes.AddShape(msoShapeRectangularCallout, 12.5, 723.75, 80, 46.25)
's.IncrementRotation 180
s.Adjustments.Item(1) = -0.46355
s.Adjustments.Item(2) = -1.39427
s.TextFrame.Characters.Text = Sheets("Tables").Range("c5") '"This is some label text"
' s.TextFrame.AutoSize = True
With s.TextFrame2.TextRange.Font.Fill
.ForeColor.RGB = RGB(0, 0, 0)
End With
s.Select
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 0.75
.Transparency = 0
.ForeColor.RGB = RGB(0, 0, 0)
End With
Selection.ShapeRange.Fill.Visible = msoFalse
' With Selection.ShapeRange.Line
' .Visible = msoTrue
' .ForeColor.RGB = RGB(0, 0, 0)
' .Transparency = 0
' End With
End Sub