Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to create a window with all worksheets using VBA?

I want my Excel files to be easy to navigate. I have a lot of worksheets, and switching between them using PgUp and PgDn is not very convenient.

I found this command

Application.CommandBars("Workbook Tabs").ShowPopup

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

But if there are more than 15 sheets, it doesn’t display all sheets. And if you click on "More sheets …", then this window will appear:

enter image description here

Is there a way to display this window right away?

>Solution :

Is there a way to display this window right away?

You mean like this?

Application.CommandBars("Workbook Tabs").Controls(16).Execute

Usage would be like

If ThisWorkbook.Sheets.Count > 16 Then
    Application.CommandBars("Workbook Tabs").Controls(16).Execute
Else
    Application.CommandBars("Workbook Tabs").ShowPopup
End If
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading