M
Marcus Analyst
I have written a Macro that automatically hides rows on a sheet upon opening
the file. When I protect the sheet, I get a run-time error 1004 "Unable to
set the hidden property of the Range Class". QUESTION: How do I get this
macro to run and protect most of the cells on the sheet? Here is the code.
Sub Auto_open()
'
' Auto_open Macro
' Hides rows 8 through 28 on "Current" worksheet
'
' Keyboard Shortcut: Ctrl+h
'
Sheets("CURRENT").Select
Rows("8:28").Select
Selection.EntireRow.Hidden = True
Sheets("Cover").Select
End Sub
the file. When I protect the sheet, I get a run-time error 1004 "Unable to
set the hidden property of the Range Class". QUESTION: How do I get this
macro to run and protect most of the cells on the sheet? Here is the code.
Sub Auto_open()
'
' Auto_open Macro
' Hides rows 8 through 28 on "Current" worksheet
'
' Keyboard Shortcut: Ctrl+h
'
Sheets("CURRENT").Select
Rows("8:28").Select
Selection.EntireRow.Hidden = True
Sheets("Cover").Select
End Sub