Drop Down List Box On Change Event 
Author Message
 Drop Down List Box On Change Event

I am having trouble getting the change event to execute for a drop down
list box.  I want to execute code based on the selection a user makes.
I am using VB Professional Ver 6.0 on an NT 4.0 SP5 Box.


Fri, 26 Jul 2002 03:00:00 GMT  
 Drop Down List Box On Change Event
You might try the Click event instead.

'===============
Private Sub Combo1_Click()
   Debug.Print Combo1.List(Combo1.ListIndex) 'Show the item that the user clicked on.
End Sub
'===============

Quote:

> I am having trouble getting the change event to execute for a drop down
> list box.  I want to execute code based on the selection a user makes.
> I am using VB Professional Ver 6.0 on an NT 4.0 SP5 Box.



Fri, 26 Jul 2002 03:00:00 GMT  
 Drop Down List Box On Change Event


Quote:
> I am having trouble getting the change event to execute for a drop
down
> list box.  I want to execute code based on the selection a user makes.
> I am using VB Professional Ver 6.0 on an NT 4.0 SP5 Box.

The Change fires when the user types into the textbox.  The Click firs
when something is selected from the dropdown.

--
Please reply via the newsgroup only

Sent via Deja.com http://www.deja.com/
Before you buy.



Sat, 27 Jul 2002 03:00:00 GMT  
 Drop Down List Box On Change Event
I've tried using the click event but that is not what I'm am expecting
or needing.  The click event fires when the user first clicks on the
control to make a selection, but before the selection has been made.
You are right about the change event.  It only fires when the text in
the text box is changed, and that is only possible when a combo box is
used not a drop down list box.  Any other suggestions?

Thanks...



Sat, 27 Jul 2002 03:00:00 GMT  
 Drop Down List Box On Change Event


Quote:
> I've tried using the click event but that is not what I'm am expecting
> or needing.  The click event fires when the user first clicks on the
> control to make a selection, but before the selection has been made.
> You are right about the change event.  It only fires when the text in
> the text box is changed, and that is only possible when a combo box is
> used not a drop down list box.  Any other suggestions?

I just tried it using dropdown list and dropdown combo styles and Click
fires only after a selection is made for me.

--
Please reply via the newsgroup only

Sent via Deja.com http://www.deja.com/
Before you buy.



Sat, 27 Jul 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Drop Down List Box - Drop Down portion does not always disappear after Click event

2. List box with embeded drop down boxes

3. add, edit using drop down boxes and list boxes

4. How to change text from drop down list automatically

5. dynamically change a html form when a user select an item from a drop down list

6. DataCombo: How to change number of rows in drop-down list

7. DataCombo: How to change number of rows in drop-down list

8. Drop down list boxes

9. Drop-Down List (ComboBox) and Text Box questions

10. Drop Down List Box - Forms

11. Drop down list box

 

 
Powered by phpBB® Forum Software