Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   Click event triggered unexpectedly (http://www.programmingforums.org/showthread.php?t=12163)

ParadiseIsle Dec 11th, 2006 4:44 PM

Click event triggered unexpectedly
 
In response to the user selecting an item from a dropdown list, a value is assigned to another dropdown list on the same form. When this assignment is made, it triggers the "click" event for that other dropdown. Why should this be? Can I stop it from happening?


Private Sub Step_Click()
Select Case Step
Case "New Diameter"
Transition.Visible = True
TransitionLabel.Visible = True
Transition.Text = "Step"
End Select
End Sub()



The line Transition.Text = "Step" triggers the Transition_Click() event, and in doing so, generates an unrelated error.

kyndig Dec 16th, 2006 7:25 PM

If i understand you correctly, when you click on one combo box and make a selection, you want that value to be added to the other combo box.

This is simple, say we have two combo boxes named "one" and "two"

:

Private Sub one_Click()
    two.AddItem (one.Text)
End Sub



All times are GMT -5. The time now is 6:08 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC