Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Combo Box initial values question
Does anyone know how to make a combo box show a value when a sheet opens?
Mine are always blank when I open them until I select a value. thanks tp |
#2
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Combo Box initial values question
Hi Teepee,
Try something like: Me.ComboBox1.ListIndex = 0 --- Regards, Norman "teepee" wrote in message ... Does anyone know how to make a combo box show a value when a sheet opens? Mine are always blank when I open them until I select a value. thanks tp |
#3
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Combo Box initial values question
thanks for trying.
says 'invalid use of me keyword.' "Norman Jones" wrote in message ... Hi Teepee, Try something like: Me.ComboBox1.ListIndex = 0 --- Regards, Norman "teepee" wrote in message ... Does anyone know how to make a combo box show a value when a sheet opens? Mine are always blank when I open them until I select a value. thanks tp |
#4
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Combo Box initial values question
Hi Teepee,
Where is your code? I assumed that the combobox code would be either in a userform module or a worksheet module, in which case the keyword would not cause a problem and would refer to the userform or the sheet holding the code. --- Regards, Norman "teepee" wrote in message ... thanks for trying. says 'invalid use of me keyword.' "Norman Jones" wrote in message ... Hi Teepee, Try something like: Me.ComboBox1.ListIndex = 0 --- Regards, Norman "teepee" wrote in message ... Does anyone know how to make a combo box show a value when a sheet opens? Mine are always blank when I open them until I select a value. thanks tp |
#5
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Combo Box initial values question
What kind of combobox is it?
A dropdown from the Forms toolbar--or a combobox from the Control toolbox toolbar? And where did you put the code? teepee wrote: thanks for trying. says 'invalid use of me keyword.' "Norman Jones" wrote in message ... Hi Teepee, Try something like: Me.ComboBox1.ListIndex = 0 --- Regards, Norman "teepee" wrote in message ... Does anyone know how to make a combo box show a value when a sheet opens? Mine are always blank when I open them until I select a value. thanks tp -- Dave Peterson |
#6
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Combo Box initial values question
Hi
It is a control toolbox comb box. I tried executing Norman's code on the page - giving the error described above - and inside the box, where it just did nothing. |
#7
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Combo Box initial values question
And you placed the code behind the worksheet--not in a general module, not in
the ThisWorkbook module? You may want to share more of the code. Did you put it in the worksheet_activate event or something else??? teepee wrote: Hi It is a control toolbox comb box. I tried executing Norman's code on the page - giving the error described above - and inside the box, where it just did nothing. -- Dave Peterson |
#8
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Combo Box initial values question
Hi Tepee,
The following code in ths worksheet module worked foe me: '============= Private Sub Worksheet_Activate() With Me.ComboBox1 .ListFillRange = "A1: A10" .ListIndex = 0 End With End Sub '<<============= --- Regards, Norman "teepee" wrote in message ... Hi It is a control toolbox comb box. I tried executing Norman's code on the page - giving the error described above - and inside the box, where it just did nothing. |
#9
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Combo Box initial values question
"Norman Jones" wrote in message ... Hi Tepee, The following code in ths worksheet module worked foe me: '============= Private Sub Worksheet_Activate() With Me.ComboBox1 .ListFillRange = "A1: A10" .ListIndex = 0 End With End Sub '<<============= many thanks norman - that worked a treat. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What gets XNPV to calculate correctly if initial values are zero? | Excel Worksheet Functions | |||
Combo box list question | Excel Discussion (Misc queries) | |||
Combo box question | Excel Worksheet Functions | |||
VBA Form Combo Box question. | Excel Discussion (Misc queries) | |||
Combo Box Question | Excel Worksheet Functions |