Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am pretty much a beginnner when it comes to VBA/macro programming in excel. I am stuck with probably the simplest problem in excel. There is a form based combo box with all the properties specified using format control option. I need to find a way to make the listIndex property of the dropdown combox always set to 0, the dropdown list should always begin from the top of the index when clicked on. Thanks in advance. Vic |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
If you want your combobox to have the value from the start, insert this code in the form modules: Private Sub UserForm_Initialize() ComboBox1.ListIndex = 0 End Sub " wrote: Hello, I am pretty much a beginnner when it comes to VBA/macro programming in excel. I am stuck with probably the simplest problem in excel. There is a form based combo box with all the properties specified using format control option. I need to find a way to make the listIndex property of the dropdown combox always set to 0, the dropdown list should always begin from the top of the index when clicked on. Thanks in advance. Vic |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 28, 10:29 am, The Dude
wrote: Hi, If you want your combobox to have the value from the start, insert this code in the form modules: Private Sub UserForm_Initialize() ComboBox1.ListIndex = 0 End Sub " wrote: Hello, I am pretty much a beginnner when it comes to VBA/macro programming in excel. I am stuck with probably the simplest problem in excel. There is a form based combo box with all the properties specified using format control option. I need to find a way to make the listIndex property of the dropdown combox always set to 0, the dropdown list should always begin from the top of the index when clicked on. Thanks in advance. Vic Hello, Thanks for the reply, however when i use the code snippet i get a Run time error 424- Object required. I am guessing that ComboBox1 needs to referenced to get a handle on the ListIndex property. I am using a Combo Box from the forms toolbar. Putting a Javascript perspective in place i guess i need to call reference ComboBox1 like this WorkBook.Worksheet.ComboBox1 Not sure about the syntax. Thanks again |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That would be more something like userform1.combobox1
" wrote: On Nov 28, 10:29 am, The Dude wrote: Hi, If you want your combobox to have the value from the start, insert this code in the form modules: Private Sub UserForm_Initialize() ComboBox1.ListIndex = 0 End Sub " wrote: Hello, I am pretty much a beginnner when it comes to VBA/macro programming in excel. I am stuck with probably the simplest problem in excel. There is a form based combo box with all the properties specified using format control option. I need to find a way to make the listIndex property of the dropdown combox always set to 0, the dropdown list should always begin from the top of the index when clicked on. Thanks in advance. Vic Hello, Thanks for the reply, however when i use the code snippet i get a Run time error 424- Object required. I am guessing that ComboBox1 needs to referenced to get a handle on the ListIndex property. I am using a Combo Box from the forms toolbar. Putting a Javascript perspective in place i guess i need to call reference ComboBox1 like this WorkBook.Worksheet.ComboBox1 Not sure about the syntax. Thanks again |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Forms - Combo Box | Excel Discussion (Misc queries) | |||
Forms Combo Box | Excel Worksheet Functions | |||
Combo Box vba that works like Forms Menu combo box | Excel Programming | |||
Forms Combo Box | Excel Discussion (Misc queries) | |||
combo box and .listindex | Excel Programming |