W
Wanna Learn
Hello I created 15 command buttons below is a sample of the code for
three of them
Private Sub CommandButton1_Click()
Dim myRng As Range
Set myRng = Me.Range("a35:V64")
myRng.EntireRow.Hidden = Not (myRng(1).EntireRow.Hidden)
End Sub
Private Sub CommandButton2_Click()
Dim myRng As Range
Set myRng = Me.Range("a65:V96")
myRng.EntireRow.Hidden = Not (myRng(1).EntireRow.Hidden)
End Sub
Private Sub CommandButton3_Click()
Dim myRng As Range
Set myRng = Me.Range("a97:V129")
myRng.EntireRow.Hidden = Not (myRng(1).EntireRow.Hidden)
End Sub
So if a user clicks one of the command buttons it opens the section if they
click the second command button it opens the second section but the first
section remains open - (unless the first command button is clicked)
Only one section should be open at a time .
How can I correct this
thanks in advance
Is there a way that if th
three of them
Private Sub CommandButton1_Click()
Dim myRng As Range
Set myRng = Me.Range("a35:V64")
myRng.EntireRow.Hidden = Not (myRng(1).EntireRow.Hidden)
End Sub
Private Sub CommandButton2_Click()
Dim myRng As Range
Set myRng = Me.Range("a65:V96")
myRng.EntireRow.Hidden = Not (myRng(1).EntireRow.Hidden)
End Sub
Private Sub CommandButton3_Click()
Dim myRng As Range
Set myRng = Me.Range("a97:V129")
myRng.EntireRow.Hidden = Not (myRng(1).EntireRow.Hidden)
End Sub
So if a user clicks one of the command buttons it opens the section if they
click the second command button it opens the second section but the first
section remains open - (unless the first command button is clicked)
Only one section should be open at a time .
How can I correct this
thanks in advance
Is there a way that if th