Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Populating Userform ComboBox with worksheet names in XL2003

I'm trying to populate a ComboBox located in a userform with all of the
worksheet names in the workbook. I'm having problems getting this to work.
I found the following code in an earlier post, but no success:

for each sh in activeworkbook.sheets
combobox1.additem sh.name
next

How do I do this and where should the lines of code be located in the
overall code? What kind of sub procedure is this in (if any)?

Thanks for your help! (I'm very new to VBA and am learning as I go...)

-Mark

Reply
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
ComboBox populating problem Werner[_33_] Excel Programming 1 July 29th 05 10:00 PM
Populating a listbox from range xl2003 Ramthebuffs[_10_] Excel Programming 5 July 3rd 05 03:38 PM
Populating a ComboBox DirInfo Excel Programming 1 March 17th 05 10:03 PM
Populating sheet names in combobox Todd Huttenstine[_2_] Excel Programming 3 December 21st 03 12:11 AM
populating a combobox on a worksheet Tim Marsh[_2_] Excel Programming 2 November 3rd 03 12:44 PM


All times are GMT +1. The time now is 05:50 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"