Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI,
I'm creating a form that will allow me to switch sheets instead of using the tabs at the bottom (I have created this form already). How do I get the names of the sheets onto the listbox on the form. Thanks in advance Grd |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this event in the userform module
Private Sub UserForm_Initialize() For Each ws In ActiveWorkbook.Sheets If ws.Visible = True Then Me.ListBox1.AddItem (ws.Name) End If Next End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Grd" wrote in message ... HI, I'm creating a form that will allow me to switch sheets instead of using the tabs at the bottom (I have created this form already). How do I get the names of the sheets onto the listbox on the form. Thanks in advance Grd |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Userform1.Listbox1.Clear
For Each sh In Activeworkbook.Sheets Userform1.Listbox1.AddItem sh.Name Next sh add this code in the userform somewhere, activate event probably. -- HTH RP (remove nothere from the email address if mailing direct) "Grd" wrote in message ... HI, I'm creating a form that will allow me to switch sheets instead of using the tabs at the bottom (I have created this form already). How do I get the names of the sheets onto the listbox on the form. Thanks in advance Grd |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Populating listbox with sheet names | Excel Discussion (Misc queries) | |||
How do I import a list of names into a separate form that prints . | Excel Worksheet Functions | |||
Sheet names in a form dropdown | Excel Programming | |||
Create drop list on form from range names? | Excel Programming | |||
ListBox with hidden and visible sheet names? | Excel Programming |