Sorry I took so long to get back....I was at work before and got busy, and
am home now....
This is crude, but does perform the desired task.....enough to give you the
idea, anyway.
Sub CheckIfHidden()
Sheets("sheet1").Select
'Do Your code here to sheet1 which was not hidden
If Sheets("sheet2").Visible = False Then
Sheets("sheet2").Visible = True
Sheets("sheet2").Select
'Do your code here to sheet2 if it was hidden
Sheets("sheet2").Visible = False
Else
Sheets("sheet2").Select
'Do your code here to sheet2 if it was not hidden
End If
End Sub
Vaya con Dios,
Chuck, CABGx3
"Metallo" <Metallo@discussions.microsoft.com> wrote in message
news:E47E04B1-9C6D-4ED3-9CF0-B2B6D615B62F@microsoft.com...
> Chuck,
>
> Easy to say, but I have no clou on how to instruct the macro to check if
the
> sheet is hidden or not.
> Can you give me a sample so that I understand how it works and then I can
> apply it to my macro?
>
> Thanks man
>
> Vai con Dio, indeed!
> Alex
>
> "CLR" wrote:
>
> > You can reach your end goal by altering your Macro to first check each
sheet
> > to see if it is Hidden, and if so then unhide it > perform your
reformatting
> > > and then rehide it and go on to the next.......if the sheet is not
hidden,
> > then just perform the reformatting and go on.....
> >
> > Vaya con Dios,
> > Chuck, CABGx3
> >
> >
> >
> > "Metallo" wrote:
> >
> > > Hi,
> > >
> > > I have a WB with 10 worksheets.
> > > At the time I did this WB, I also created a Macro that had the task
to
> > > change the format of all the sheets.
> > > Today, I have decided to hide some of the sheets and the macro does no
> > > longer work.
> > > I guess this is because it cannot find the sheets which are hidden.
> > >
> > > My question is: Is there a way to allow the Macro to work as before,
meaning
> > > to continue changing the format of the hidden sheets as well?
> > > Something like a condition that says, if Sheet XY is hidden then look
for it
> > > into etc.
> > >
> > > Thank you
> > > Alex
> > >
Bookmarks