Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Goto next visible worksheet
What macro command would I include tied to a button to go to the next
visible worksheet? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Goto next visible worksheet
Before or after the current one?
The keyboard commands use Ctrl+Page Up and Ctrl+Page Down. Record these, using the macro recorder, and you've got your code. -- Andy Wiggins FCCA www.BygSoftware.com Excel, Access and VBA Consultancy - "Kent McPherson" wrote in message ... What macro command would I include tied to a button to go to the next visible worksheet? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Goto next visible worksheet
Assuming the button is on the ActiveSheet:
Private Sub CommandButton1_Click() Dim i As Integer Dim intStart As Integer intStart = ActiveSheet.Index + 1 For i = intStart To Worksheets.Count If Not Worksheets(i).Visible = xlHidden Then 'Note: Could add "and Worksheets(i).Visible = xlVeryHidden to above Worksheets(i).Activate Exit Sub End If Next i End Sub "Kent McPherson" wrote: What macro command would I include tied to a button to go to the next visible worksheet? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Locate/goto a specific worksheet quickly | Excel Worksheet Functions | |||
Worksheet has to set to visible as it is not visible after saving and closing Excel by VB. | Excel Programming | |||
GoTo the cells in another worksheet that are linked | Excel Worksheet Functions | |||
GoTo Worksheet based on which button clicked | Excel Programming | |||
Goto Next VISIBLE cell below | Excel Programming |