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!
|