Sometimes, the extra set of eyes is enough to get you going again.
ReportSmith wrote:
>
> Thanks Dave. When I saw your post, I thought "Duh" - I should've known that
> - but I've been staring at this code for too long and don't know where I am
> anymore.
>
> I'll try it out. Again, thanks.
>
> "Dave Peterson" wrote:
>
> > Just avoid the hidden sheets.
> >
> > For Each sh In mybook.Worksheets
> > if sh.visible = xlsheetvisible then
> > 'do what you want
> > end if
> > next sh
> >
> >
> >
> > ReportSmith wrote:
> > >
> > > I currently have code to loop through the number of sheets in a workbook.....
> > >
> > > Set mybook = Workbooks.Open(MyPath & MyFiles(Fnum))
> > > For Each sh In mybook.Worksheets
> > >
> > > .....but I need to loop 1 less than the total number of sheets to avoid a
> > > hidden sheet in the same workbook - in other words, I need something like.....
> > > For Each [sh-1] In mybook.Worksheets..........
> > >
> > > Any suggestions?
> > >
> > > Thanks in advance.
> >
> > --
> >
> > Dave Peterson
> >
--
Dave Peterson
|