View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
KurviousKoala KurviousKoala is offline
external usenet poster
 
Posts: 3
Default ActiveSheet.Next with hidden sheets

Hello,

I currently have a spreadsheet that has a 'veryhidden' sheet.

I have written a macro to navigate foward and backwards throughout the
spreadsheet, however, when it gets to the hidden sheets location, the macro
will not skip over it.

Macro:
ActiveSheet.Next.Select
Even when I use the macro recorder, the code is as per above?!?!

I have found that the error is:
1004, 'Select method of worksheet class failed'.

I have managed to use the errorhandler to move past this by calling the next
sheet by name, but fear this sheetname may get changed in the future.... is
there anyway of retrieving the sheet index number?

Thanks,
KK