bamaisgreat
Well-known Member
- Joined
- Jan 23, 2012
- Messages
- 831
- Office Version
- 365
- Platform
- Windows
Thanks for looking at my post.
I have the code below for hiding a column in my workbook. I was wanting to see if the code could be made so it would hide column A on any sheet. I have 21 sheets in the workbook
I have the code below for hiding a column in my workbook. I was wanting to see if the code could be made so it would hide column A on any sheet. I have 21 sheets in the workbook
Code:
Sub Hide_Column()
ActiveSheet.Unprotect
If Sheets("Sht#1").Range("A").EntireColumn.Hidden = False Then
Sheets("Sht#1").Range("A").EntireColumn.Hidden = True
Else
Sheets("Sht#1").Range("A").EntireColumn.Hidden = False
End If
ActiveSheet.Protect
End Sub