Macro that choose which worksheet to view that is on ALL wor

Cosmos75

Active Member
Joined
Feb 28, 2002
Messages
359
Is there a macro that choose which worksheet to view? Maybe a combo box on each page? BUT I need those combo boxes to appear automatically on each worksheet and be popoulated/updated with the worksheets automatically since this workbook is updated continually.

And YES, I know you can use the tabs at the bottom, but that can be cumbersome with a lot of worksheets.

Thanks!
 
Found another tidbit that moves you through the sheets one at a time.

Use Ctrl-Page Down and Ctrl Page Up to move through the worksheets one at a time.

The equivalent VBA code is ActiveSheet.Previous.Select or ActiveSheet.Next .Select

Hope this proves useful to you!

"With Great Knowledge Comes Great Responsibility!" - Excel-Man
 
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Re: Macro that choose which worksheet to view that is on ALL

OK, I know this has been answered before but I can't seem to find it.

If I use
Code:
Application.CommandBars("Workbook tabs").ShowPopup
then I get menu to choose which worksheet I want to activate. But if there are a lot of worksheets, it'll show the first 15 (in order that it is arranged in workbook), and the last one will be "More sheets..", which when selected brings up a a kind of listbox that list ALL the available sheets in the active workbook to choose from.

Is there code to bring that menu (listbox)?
 
Upvote 0
Re: Macro that choose which worksheet to view that is on ALL

Respected Excel Guru Damon (Namaskar)

His solution:

Sub SelectWorksheetMenu()
Application.CommandBars("Workbook tabs").ShowPopup
End Sub

Is the best solution I have seen ever for managing worksheet.

Regard to him.

http://www.pexcel.com/samplefile/sheetname/sheetnames.zip

is a sheet example file i have on my website. Added little color and a normal routine, could not resist to post here...

somebody has said. if you wanna be great you should "read between the lines."
 
Upvote 0
Re: Macro that choose which worksheet to view that is on ALL

With a little more searching I found this.
Code:
    x = ActiveWorkbook.Sheets.Count
    If x > 16 Then
        Application.CommandBars("Workbook Tabs").Controls("More Sheets...").Execute
    Else
        Application.CommandBars("Workbook Tabs").ShowPopup
    End If
I guess you can't use the "listbox" unless you have more than 16 worksheets?
:confused:
 
Upvote 0
Re: Macro that choose which worksheet to view that is on ALL

nisht,

NICE example! :)

But I have no idea how that works since the code is protected. :cry:
 
Upvote 0
Re: Macro that choose which worksheet to view that is on ALL

Sorry for inconviency,

YOu can download now, I have remove the protection.


Thank you for downloading.
 
Upvote 0
Re: Macro that choose which worksheet to view that is on ALL

Hello All,

I'm using this code to engage the "Activate Sheet" pop-up.
Code:
Sub Select_Sheet()
'
' select_sheet Macro
'
' Keyboard Shortcut: ctrl+k
'
    If ActiveWorkbook.Sheets.Count <= 16 Then
        Application.CommandBars("Workbook Tabs").ShowPopup 500, 225
    Else
        Application.CommandBars("Workbook Tabs").Controls("More Sheets...").Execute
    End If
End Sub

The Activate Sheet popup appears and brings me to the desired page when I use the macro pane ALT+F8, but when I use the keyboard shortcut the Activate Sheet pane appears, but it won't take me to the selected sheet. The pane just closes.

Wondering if any of you have experienced this problem before. I've tried using several different keyboard shortcuts–it's not that.

Thanks in advanced for any help you might have to offer...

Best,
m
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top