keith barnes
01-13-2023, 06:49 PM
Hi Guys
I have some code that works ok to hide and unhide columns.
Sub hideit()
Range("C:N").EntireColumn.Hidden = True
End Sub
Sub unhideit()
Range("C:N").EntireColumn.Hidden = False
End Sub
Can someone please show me how to toggle both macro using 1 command button. ie, click once and the column hides-click again and the column appears.
If this is not possible then maybe option buttons of something else, but i would really like a command button.
PS these command buttons are active x in a userform
I have some code that works ok to hide and unhide columns.
Sub hideit()
Range("C:N").EntireColumn.Hidden = True
End Sub
Sub unhideit()
Range("C:N").EntireColumn.Hidden = False
End Sub
Can someone please show me how to toggle both macro using 1 command button. ie, click once and the column hides-click again and the column appears.
If this is not possible then maybe option buttons of something else, but i would really like a command button.
PS these command buttons are active x in a userform