View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
Héctor Miguel Héctor Miguel is offline
external usenet poster
 
Posts: 434
Default Test for if sheet is HIDDEN

hi, Chuck/Guys ! (just wild ideas)...

activesheet implies/requires that the activeworkbook' window is/stays visible
(and therefore the activesheet is also visible)
for what doesn't require to be proven the visibility of activesheet -?-

if you are not looping through sheets & activating each of them...
is "ActiveSheet" required ?

(as I said, just wild ideas)

regards,
hector.

Yeah, I know, <headhanginglow, sorry
And, I admit, I didnt try either of the suggestions as posted, I just tried to take out what I thought I needed.
What I'm trying to do is use one macro to step through all the sheets in a workbook, about 8 of them.
And while in each sheet, to call in other macros to do specific tasks. This is all working fine.
Now I'm trying to add a new outside macro that will identify if each sheet is Hidden or not
and if so, do one thing and if not, do another. This is where I'm running into trouble.
For instance if I use this in an outside macro, it works fine to tell me if the sheet is Protected.......

If ActiveSheet.ProtectContents = True Then

But, when I try to use this one to find out if each sheet is Hidden or not, I get only that they are all hidden
or none are.....the code does not crash, nor return an error.
It simply refuses to differentiate between hidden and non-hidden sheets.

If ActiveSheet.Visible = True Then
(...)