Sheet Name Combo Box

jessi81882

New Member
Joined
Jul 20, 2016
Messages
26
Hi

I want to create a combo box (or anything with hyperlinks) that will list all active sheets in a workbook. This could alter as I have another macro that allows the user to add a new sheet so you could have Continuation(2) all the way to Continuation(100). But I need this macro to ignore hidden sheets as I have an Admin Sheet hidden which contains all the data for behind the scenes in my workbook.

Can anyone help?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
This code will add to a listbox. I am not sure I understand the hyperlink requirement, but you can modify the code to list the sheets on 'navigation' sheet within your workbook or to a combo box..

Code:
    SheetCount = ThisWorkbook.Worksheets.Count
    For m = 1 To SheetCount
        MyName = ThisWorkbook.Sheets(m).Name
        If MyName <> "Name I Want to Skip" Then 
             Me.lstMyListBox.AddItem MyName
        End if
    Next

Mark
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

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