drewbsking
New Member
- Joined
- Nov 3, 2011
- Messages
- 34
I would like to set the value of a toggle button when the userform is opened so that it coincides with the what columns are hidden on screen. Below is simple example which I have not tested or debugged. It was just what i was thinking.
Does anyone have any suggestions? Mr. Users have been a GREAT help and I'm getting better and better at writing VBA code so thank you all in advance.
Does anyone have any suggestions? Mr. Users have been a GREAT help and I'm getting better and better at writing VBA code so thank you all in advance.
Code:
Sub Macro2()
'if col A is hidden
If Columns("A").EntireColumn.Hidden = True Then
'make hidecalcs toggle button true (sunken)
Userform1.HideCalcs.Value = True
Else
'make hadcalcs toggle button false (raised)
Userform1.HideCalcs.Value = False
End If
End Sub