Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Populating a ComboBox

I have two questions. 1. i need to populate 10 comboboxes with the same
items. how do i do that without just using additem for each combobox for
each item?

2. When the excel sheet is opened i want the comboboxes to be automatically
populate (rather than having to run the macro each time i open the file,
currently when i open the workbook the comboboxes are blank until i run the
macro) if i use the worksheet_activate i have to leave the sheet and then go
back to it in order for it to run. is there a workbook_activate?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Populating a ComboBox

put the items in an array, assign the array to the list of each combobox.
v = Range("A1:A10")
for i = 1 to 10
activesheet.OleObjects("Combobox" & i)Object.List = v
Next

--
Regards,
Tom Ogilvy

"DirInfo" wrote in message
...
I have two questions. 1. i need to populate 10 comboboxes with the same
items. how do i do that without just using additem for each combobox for
each item?

2. When the excel sheet is opened i want the comboboxes to be

automatically
populate (rather than having to run the macro each time i open the file,
currently when i open the workbook the comboboxes are blank until i run

the
macro) if i use the worksheet_activate i have to leave the sheet and then

go
back to it in order for it to run. is there a workbook_activate?

Thanks!



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
Populating combobox from another combobox David Goodall Excel Programming 1 September 12th 04 03:42 PM
Populating combobox/listbox Torstein S. Johnsen[_2_] Excel Programming 1 May 13th 04 09:26 AM
Populating ComboBox Methods Todd Huttenstine[_2_] Excel Programming 8 January 19th 04 12:14 AM
Populating Combobox Methods Todd Huttenstine[_2_] Excel Programming 10 January 18th 04 10:19 PM
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:57 PM.

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"