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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox Click events??? 1

Status
Not open for further replies.

zachlaka

Programmer
Aug 6, 2004
6
0
0
US
I have a form and on this form I have
1 listbox
9 images
3 textboxes
1 command button

I want to be able to click on one of my words in the list box then click the command button and have a certain picture load into the image1 box. I have the other 8 pictures on the form not enabled but would like the one associated with the word enabled and shown into image1.

I also want the three text boxes to have certain text shown when I click on a certain word then click the command button. Each word will have different text for each of the 3 text boxes.

I basically want to click a word in the listbox click the command button and have the image change and the 3 text boxes depending on which word I click.


TIA ~Zach
 
Normally on a listbox (I assume you mean <select>) you use the onchange event rather than the onclick event.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
tsdragon this is not javascript!

------------

zachlaka, use something like this:

Private Sub List1_Click()
Select Case List1.ListIndex
Case 1
Text1.Text = "blah"
' ...
Case 2
' ...
' ...
End Select
End Sub
 
OOPS! That's what I get for doing this AND the javascript forum. Happens at work too, since I do both VB and JS there as well.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top