Hi,
I'm stuck how to adapt the following code to what I need.
Sub ButtonsRenamed2()
r = 0
For Each myButton In ActiveSheet.Shapes
If Left(myButton.Name, 6) = "Button" Then
myButton.Select
With Selection
.Top = 10
.Left = 15 + r
End With
End If
r = r + 85
Next myButton
End Sub
While this works, its not putting the buttons in the order i want, which is Button 2 to Button 43 in order. (will need as the next stage to sort into 3 rows!)
So rather than a for each, i need to step through 2 to 43
Can't get the syntax right on myButton = ........
Sub ButtonsRenamed2()
Dim myButton As Shape
r = 0
For i = 2 To 44 Step 1
myButton = ActiveSheet.Shapes.Button(i)
myButton.Select
With Selection
.Top = 10
.Left = 15 + r
End With
r = r + 85
Next i
End Sub
Bookmarks