I am trying to Show / Hide row(s). Unprotected, it works fine. However, when I protect and try to use the macro buttons, I get an "Unable to set hidden property of range class." What am I doing wrong?
Here is my code:
Public Sub AllowMacros()
Me.Protect UserInterfaceOnly:=True
End Sub
Sub Hide_Answer()
'
' Hide_Answer Macro
'
'
Rows("19:20").Select
Selection.EntireRow.Hidden = True (<- this part is highlighted )
Range("B19:Q20").Select
End Sub
Sub Show_Answer()
'
' Show_Answer Macro
'
'
Rows("19:20").Select
Selection.EntireRow.Hidden = False
Range("B19:Q20").Select
End Sub