View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default get a list of sheet names onto a listbox on a form

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