Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm struggling with this one. Can anyone help me. Thanks Gordon |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for each sh in thisworkbook.worksheets
listbox1.AddItem sh.name Next -- Regards, Tom Ogilvy "Gordon" wrote in message ... Hi, I'm struggling with this one. Can anyone help me. Thanks Gordon |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
for each sh in activeworkbook.sheets me.combobox1.additem sh.name next Gordon a écrit : Hi, I'm struggling with this one. Can anyone help me. Thanks Gordon |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I too am struggling with a similar problem. I have created a form that is required to pop up and ask for user input on the particular field to use for some processing. Rather than have the user type in a field name and then vaildate it, I would like to launch a user form with a combo box in which the list of fields is pre-loaded using the combobox.AddItem method and then allow the user to choose one of them. At what point can I populate the combo box list? The combo box appears to "get live" the moment the form initialization takes place and so the list add item does not happen before the combo box comes to life. How do I do this? I saw an example using calls to a dynamic library using cbo.AddItem. Could this be elaborated upon please ? Many thanks Jai "anonymousA" wrote: Hi, for each sh in activeworkbook.sheets me.combobox1.additem sh.name next Gordon a écrit : Hi, I'm struggling with this one. Can anyone help me. Thanks Gordon |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put your .addItem...... code in the Activate event of the form.
Alternatively if you have the items in a range of cells in the workbook, you could set the RowSource property of the combo box to point to the list. This avoids having to update the VBA code whenever you have a new item. HTH On Sat, 29 Oct 2005 10:30:03 -0700, Jai wrote: Hi, I too am struggling with a similar problem. I have created a form that is required to pop up and ask for user input on the particular field to use for some processing. Rather than have the user type in a field name and then vaildate it, I would like to launch a user form with a combo box in which the list of fields is pre-loaded using the combobox.AddItem method and then allow the user to choose one of them. At what point can I populate the combo box list? The combo box appears to "get live" the moment the form initialization takes place and so the list add item does not happen before the combo box comes to life. How do I do this? I saw an example using calls to a dynamic library using cbo.AddItem. Could this be elaborated upon please ? Many thanks Jai "anonymousA" wrote: Hi, for each sh in activeworkbook.sheets me.combobox1.additem sh.name next Gordon a écrit : Hi, I'm struggling with this one. Can anyone help me. Thanks Gordon __ Richard Buttrey Grappenhall, Cheshire, UK __________________________ |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gordon,
Thanks. Iwas putting the code in the Initialize event and got stuck. I have tried the row source route earlier, but this time the list items are coming from different workbooks and so this may not be so elegant though I am sure it will work. Thanks once again. "Gordon" wrote: Hi, I'm struggling with this one. Can anyone help me. Thanks Gordon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i populate a text box according to selection in combobox? | Excel Worksheet Functions | |||
Populate combobox | Excel Programming | |||
populate combobox with sheet names | Excel Programming | |||
populate combobox with sheet names | Excel Programming | |||
Populate a combobox | Excel Programming |