Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook with about 50 sheets. I have a decision tree that
unhides sheets based on the answers to screening questions. I want to add navigation buttons to allow users to go to the next or previous sheets. When the next sheet is hidden the macro hangs. How can move to the next unhidden sheet? I've tried: activesheet.next.select which didn't work. Any thoughts? thanks in advance, Dave |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dim sh as Object if Activesheet.Index < Sheets.count then set sh = activesheet.Next do while sh.visible < xlSheetVisible and sh.Index < sheets.count set sh = sh.Next Loop if sh.visible = xlSheetVisible then sh.Activate else msgbox "Nothing to do" end if -- Regards, Tom Ogilvy "savalou" wrote in message ups.com... I have a workbook with about 50 sheets. I have a decision tree that unhides sheets based on the answers to screening questions. I want to add navigation buttons to allow users to go to the next or previous sheets. When the next sheet is hidden the macro hangs. How can move to the next unhidden sheet? I've tried: activesheet.next.select which didn't work. Any thoughts? thanks in advance, Dave |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Left off the last end if
Dim sh as Object if Activesheet.Index < Sheets.count then set sh = activesheet.Next do while sh.visible < xlSheetVisible and sh.Index < sheets.count set sh = sh.Next Loop if sh.visible = xlSheetVisible then sh.Activate else msgbox "Nothing to do" end if Else msgbox "Your at the last" End if -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Dim sh as Object if Activesheet.Index < Sheets.count then set sh = activesheet.Next do while sh.visible < xlSheetVisible and sh.Index < sheets.count set sh = sh.Next Loop if sh.visible = xlSheetVisible then sh.Activate else msgbox "Nothing to do" end if -- Regards, Tom Ogilvy "savalou" wrote in message ups.com... I have a workbook with about 50 sheets. I have a decision tree that unhides sheets based on the answers to screening questions. I want to add navigation buttons to allow users to go to the next or previous sheets. When the next sheet is hidden the macro hangs. How can move to the next unhidden sheet? I've tried: activesheet.next.select which didn't work. Any thoughts? thanks in advance, Dave |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
that's great. Thanks very much.
Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Skip Rows in Fill Series and Filter to Two different sheets | Excel Worksheet Functions | |||
Skip hidden rows while copying down in excel? | Excel Discussion (Misc queries) | |||
How do I copy information and skip hidden cells? | Excel Discussion (Misc queries) | |||
Sheets Skip Macro | Excel Discussion (Misc queries) | |||
skip empty sheets | Excel Programming |