View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default hide rows with macro/togglebutton

unprotect the sheet just prior to the code, then protect it after.

--
HTH

Bob Phillips

"huntermcg" wrote
in message ...

.. addition to former reply post:

it is a Run-time error '1004':

this is my code.

Sub Macro1()
Rows("4:20").Hidden = Not Rows("4:20").Hidden
End Sub
Sub Macro2()
Rows("22:39").Hidden = Not Rows("22:39").Hidden
End Sub
Sub Macro3()
Rows("40:54").Hidden = Not Rows("40:54").Hidden
End Sub
Sub Macro4()
Rows("55:68").Hidden = Not Rows("55:68").Hidden
End Sub

maybe this helps ...


--
huntermcg
------------------------------------------------------------------------
huntermcg's Profile:

http://www.excelforum.com/member.php...o&userid=19391
View this thread: http://www.excelforum.com/showthread...hreadid=469683