View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Otto Moehrbach[_2_] Otto Moehrbach[_2_] is offline
external usenet poster
 
Posts: 1,071
Default hide unhide rows -Protected sheet

Include code in your macro to Unprotect the sheet, do your stuff, protect
the sheet. Record a macro to find the protect/unprotect code. HTH Otto
"Wanna Learn" wrote in message
...
Hello I have a command button in a form
Private Sub CommandButton1_Click()
'hide rows
Dim myRng As Range

Set myRng = Me.Range("a32:a36")

myRng.EntireRow.Hidden = Not (myRng(1).EntireRow.Hidden)

but when I protect the form the button does not work. I also have the
rows
and columns hidden
How can I correct this ?
thanks


End Sub