Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ComboBox WorkSheet Trouble
Hello
Im trying to add the name of each worksheet to a combobox but so far I'm having little luck, I want it to be done in this style: sub userform_initialize() For x = 1 to 30 combobox1.additem sheet & x.name next x end sub This can't be far out but it doesn't work, does anyone know how to do this -- Message posted via http://www.officekb.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ComboBox WorkSheet Trouble
sub userform_initialize()
dim x as long For x = 1 to activeworkbook.sheets.count combobox1.additem activeworkbook.sheets(x).name next x end sub Or sub userform_initialize() dim wks as worksheet For each wks in activeworkbook.worksheets combobox1.additem wks.name next wks end sub "Beginner via OfficeKB.com" wrote: Hello Im trying to add the name of each worksheet to a combobox but so far I'm having little luck, I want it to be done in this style: sub userform_initialize() For x = 1 to 30 combobox1.additem sheet & x.name next x end sub This can't be far out but it doesn't work, does anyone know how to do this -- Message posted via http://www.officekb.com -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ComboBox WorkSheet Trouble
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trouble with a ComboBox on a UserForm | Excel Discussion (Misc queries) | |||
Trouble with a ComboBox on a UserForm | Excel Worksheet Functions | |||
worksheet trouble | Excel Worksheet Functions | |||
big trouble with combobox/vlookup | Excel Discussion (Misc queries) | |||
Copying Worksheet triggers Click event of combobox on another worksheet | Excel Programming |