ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combobox - can't get click event to run for first item in the list (https://www.excelbanter.com/excel-programming/369657-combobox-cant-get-click-event-run-first-item-list.html)

Dale

Combobox - can't get click event to run for first item in the list
 
I created a combo box from the control toolbox toolbar. It works fine and
the user can type in a few letters to narrow the list which displays in the
combobox. Once the list has been shortened they will click on the item they
want. Very handy.

But if the item is first in the list of available items, the click doesn't
do anything and the Click Event doesn't trigger. So my Macro -- Private Sub
ComboBox1_Click() -- doesn't run. If the clicked item is 2nd (or further
down) on the list the Click Event triggers fine and everything works.

Any ideas how to get the click event to work for the first item in the list?

Thanks!

Dale

NickHK

Combobox - can't get click event to run for first item in the list
 
Dale,
Show you code for the _Click event.
Are you making any check like
If cbo1.ListIndex0 Then...

NickHK

"Dale" wrote in message
...
I created a combo box from the control toolbox toolbar. It works fine and
the user can type in a few letters to narrow the list which displays in

the
combobox. Once the list has been shortened they will click on the item

they
want. Very handy.

But if the item is first in the list of available items, the click doesn't
do anything and the Click Event doesn't trigger. So my Macro -- Private

Sub
ComboBox1_Click() -- doesn't run. If the clicked item is 2nd (or further
down) on the list the Click Event triggers fine and everything works.

Any ideas how to get the click event to work for the first item in the

list?

Thanks!

Dale




Dale

Combobox - can't get click event to run for first item in the
 
Here's the code I have for the experimental combobox:
Private Sub ComboBox1_Click()
MsgBox "click"
End Sub

Not too exciting.
I'm not doing any checking. It sounds like maybe I should?...

Thanks!
Dale

"NickHK" wrote:

Dale,
Show you code for the _Click event.
Are you making any check like
If cbo1.ListIndex0 Then...

NickHK

"Dale" wrote in message
...
I created a combo box from the control toolbox toolbar. It works fine and
the user can type in a few letters to narrow the list which displays in

the
combobox. Once the list has been shortened they will click on the item

they
want. Very handy.

But if the item is first in the list of available items, the click doesn't
do anything and the Click Event doesn't trigger. So my Macro -- Private

Sub
ComboBox1_Click() -- doesn't run. If the clicked item is 2nd (or further
down) on the list the Click Event triggers fine and everything works.

Any ideas how to get the click event to work for the first item in the

list?

Thanks!

Dale





NickHK

Combobox - can't get click event to run for first item in the
 
Dale,
I see no reason why the Click event does not work for the first item in the
list, but works for all others.

NickHK

"Dale" wrote in message
...
Here's the code I have for the experimental combobox:
Private Sub ComboBox1_Click()
MsgBox "click"
End Sub

Not too exciting.
I'm not doing any checking. It sounds like maybe I should?...

Thanks!
Dale

"NickHK" wrote:

Dale,
Show you code for the _Click event.
Are you making any check like
If cbo1.ListIndex0 Then...

NickHK

"Dale" wrote in message
...
I created a combo box from the control toolbox toolbar. It works fine

and
the user can type in a few letters to narrow the list which displays

in
the
combobox. Once the list has been shortened they will click on the

item
they
want. Very handy.

But if the item is first in the list of available items, the click

doesn't
do anything and the Click Event doesn't trigger. So my Macro --

Private
Sub
ComboBox1_Click() -- doesn't run. If the clicked item is 2nd (or

further
down) on the list the Click Event triggers fine and everything works.

Any ideas how to get the click event to work for the first item in the

list?

Thanks!

Dale








All times are GMT +1. The time now is 03:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com