LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default list sheet tab names in listbox

hi
i assumed that it would be part of the forms initialization but it would be
easy enought just to swith
Sub UserForm_Initialize()
to
sub commandbutton1_click()
or just add it to code you may already have in commandbutton1.

Regards
FSt1
"pswanie" wrote:

that worked...

now can i get a this to run when a user click on commandbutton1

sub comandbutton1_click
if nothing in listbox1 selected then

msgbox "please select month"

else
call savetosheet
end sub

"FSt1" wrote:

hi
something like this might work
Private Sub UserForm_Initialize()
Dim WS As Worksheet
For Each WS In Worksheets
Listbox1.AddItem WS.Name
Next
End Sub

regards
FSt1
"pswanie" wrote:

how do i list all the sheet tab names in the current workbook in listbox1?
the listbox1 is on userform1

thanx

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populating listbox with sheet names johnb Excel Discussion (Misc queries) 1 May 16th 08 12:33 PM
How do I get a list from an excel sheet into a userform/listbox? Örjan Kihlbaum Excel Programming 4 October 31st 07 02:41 PM
Generate sheet names from list, assign data to summary sheet. [email protected][_2_] Excel Programming 4 June 20th 07 09:17 PM
get a list of sheet names onto a listbox on a form Grd Excel Programming 2 August 8th 05 09:34 PM
ListBox with hidden and visible sheet names? Rockee052[_43_] Excel Programming 8 February 20th 04 09:36 AM


All times are GMT +1. The time now is 10:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"