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
I get the same results with Ricks code of
If Not WS.Visible Then
And the same with variations of your code such as
ws.xlSheetHidden
I'm sure that both of the suggestions work, in the contexts that you all
presented them, but I'm trying to incorporate their principals into what I've
already got, and THAT is what is not working. I did not mean to imply that
either of you offered bad code, and I apologize if that impression was taken.
Incidently, although I write mostly in XL97, I did try these suggestions in
XL2k and XLXP and got the same results.
So, hopefully someone can see my situation here and assist.
Thanks again to all who have responded so far.
Vaya con Dios,
Chuck, CABGx3