I have 2 buttons on my screen (a Hide button and a Show button--created via insert shapes) that each are assigned a separate macro. One calls a macro to hide a column and the other shows that same column. Here are the subs:
[pre]
[/pre]
Is there a way to combine these and set up the button on the screen to be a toggle? I could label it Hide/Show. Click it and it hides the column. Click it again and it shows the column. Can this be done?
[pre]
Code:
Sub HideSuggestedColumn()
Application.ScreenUpdating = False
Sheets("Lessons Learned").Columns("I:I").EntireColumn.Hidden = True
End Sub
Sub ShowSuggestedColumn()
Application.ScreenUpdating = False
Sheets("Lessons Learned").Columns("I:I").EntireColumn.Hidden = False
End Sub
Is there a way to combine these and set up the button on the screen to be a toggle? I could label it Hide/Show. Click it and it hides the column. Click it again and it shows the column. Can this be done?