Forum Discussion
tmadaras485
Mar 06, 2023Copper Contributor
Hide/unhide Columns using checkbox
I want to hide/unhide a couple of columns with a checkbox. Say columns K and L are the two columns I want to hide/unhide - how would I go about doing that.
tmadaras485
Mar 06, 2023Copper Contributor
hide the columns when it is checked I want to unhide when it is checked.
HansVogelaar
Mar 06, 2023MVP
That's easy:
Sub HideUnhide()
Range("K1:L1").EntireColumn.Hidden = _
(ActiveSheet.Shapes("Check Box 1").ControlFormat.Value <> 1)
End Sub