Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Forms Combo Box Listindex set to zero

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Forms Combo Box Listindex set to zero

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Forms Combo Box Listindex set to zero

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Forms Combo Box Listindex set to zero

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms - Combo Box SueDot Excel Discussion (Misc queries) 0 May 12th 10 10:30 PM
Forms Combo Box Gilda Excel Worksheet Functions 1 February 25th 08 05:32 PM
Combo Box vba that works like Forms Menu combo box Hector Fernandez Excel Programming 4 December 12th 06 08:30 PM
Forms Combo Box customer master Excel Discussion (Misc queries) 3 July 17th 06 10:10 PM
combo box and .listindex dirt Excel Programming 3 September 10th 04 03:01 AM


All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"