Heyjoe
New member
VBA programmers,
I have a worksheet with 8 command buttons on it. I wrote the following code to hide the last 4 command buttons.
It made the 3, 5 & 6 command buttons invisible.
Is there a better way to do this or do I have to specify which command buttons that I want to make invisible by the name of the command button?
I have a worksheet with 8 command buttons on it. I wrote the following code to hide the last 4 command buttons.
Code:
Public Sub Practice()
Sheets("prac").Select
Dim n As Byte
For n = 6 To 8
ActiveSheet.Shapes.Range(Array(n)).Visible = True
Next n
End Sub
It made the 3, 5 & 6 command buttons invisible.
Is there a better way to do this or do I have to specify which command buttons that I want to make invisible by the name of the command button?