View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dean[_8_] Dean[_8_] is offline
external usenet poster
 
Posts: 407
Default Syntax help for if

Currently, I have a macro that protects or unprotects all sheets. However,
sometimes a couple of the sheets are hidden. How do I modify (if, then or
something like that) the code below to say, if "Summary" sheet is hidden,
ignore the protection of it? Right now, for example, I have, the following
inside the macro (where unprotectPW_Sheet is a macro that unprotects the
current sheet):

Sheets("Summary").Select
UnProtectPW_Sheet

Actually, maybe, if it is hidden, I should unhide it, protect it, then
rehide it. How about that?

Thanks!
Dean