Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make combobox respond to event?

Status
Not open for further replies.

huBBLe

Programmer
May 15, 2001
50
SG
Hi,

I have a combobox with two item in it. I want to display a form depending on what is the item selected. This was what I did:

Private Sub Combo1_Change()
If Combo1.Text = "Yes" Then
Form1.Show
Form2.Hide
End Sub

Is the event used (Change) correct? This code doesn't work, can anyone help?

Thanks a million!
 
You should use the Click event of the Combo Box. Your code should work, if you place in the Click event.

Mukund.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top