I'm trying to hide and unhide columns using a macro. Ideally it should require a password to unhide. this is what I have so far
Sub View()
' View Macro
' Keyboard Shortcut: Ctrl+v
'
Columns("G:N").Select
ActiveSheet.Unprotect
Selection.EntireColumn.Hidden = False
Range("N6").Select
End Sub
Sub Hide()
' Hide Macro
' Keyboard Shortcut: Ctrl+h
'
Columns("H:L").Select
Selection.EntireColumn.Hidden = True
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False
End Sub
the view works fine but the hide hides ALL columns in the sheet. Can anyone help?
Bookmarks