Hi all,
I want to insert shapes from just 1 to 5.
Numbers 1 to 5 are inserted in 1st column but only 1st shape is inserted on top on theprevious one, while on the other hand code fails while inserting shapes. please let me know why this happens.
>>> use code - tags <<<
I want to insert shapes from just 1 to 5.
Numbers 1 to 5 are inserted in 1st column but only 1st shape is inserted on top on theprevious one, while on the other hand code fails while inserting shapes. please let me know why this happens.
>>> use code - tags <<<
Code:
Dim topRow As Range
Dim Shapenumber As Integer
topRow.Value = "Shapenumber"
topRow.Offset(0, 1).Value = "Shape"
For Shapenumber = 1 To 5
topRow.Offset(Shapenumber, 0).Value = Shapenumber
topRow.Offset(Shapenumber, 1).Value = ws.Shapes.AddShape(Shapenumber, _
topRow.Offset(Shapenumber, 1).Left + 5, topRow.Offset(Shapenumber, 1).Top + 3, 20, 10)
Next Shapenumber
Last edited by a moderator: