LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 407
Default Syntax help for if

Worked like a charm - thanks.

"Tom Ogilvy" wrote in message
...
Dim sh as Worksheet
for each sh in worksheets
if sh.visible = xlSheetVisible then
sh.Select
' protect or unprotect
end if
Next

--
Regards,
Tom Ogilvy



"Dean" wrote:

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





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax HELP Eric H Excel Discussion (Misc queries) 4 August 30th 08 01:30 AM
Need syntax help! FCC[_6_] Excel Programming 6 June 30th 06 10:30 AM
If then syntax RL Excel Worksheet Functions 3 June 22nd 05 05:30 AM
help in syntax james Excel Programming 2 February 26th 05 11:54 AM
Syntax Michael[_23_] Excel Programming 1 December 30th 03 10:08 PM


All times are GMT +1. The time now is 09:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"