I try to hide the worksheet with the string-value of column "MM".
So I need the row where the Button is located.
I cannot find any feature of ToggleButton like location, position, address to get to the row.
Can someone give me a hint?
Thank you
So I need the row where the Button is located.
I cannot find any feature of ToggleButton like location, position, address to get to the row.
Can someone give me a hint?
Code:
Private Sub ToggleButton1_Click()
client = Cells(ToggleButton1.Row, 1).Text
If ToggleButton1.Value = True Then
show (client)
Else
hide (client)
End If
End Sub
Sub show(client)
Sheets(client).Hidden = False
End Sub
Sub hide(column)
Sheets(client).Hidden = True
End Sub
Thank you