Listbox

StormX02
12-10-2002, 08:06 PM
Hi,

How do i make it so that if i click an item within a listbox, it'll do something?

Private Sub LISTBOX_GotFocus()
such and such
End Sub

does not work the way i want it to. can anyone suggest how i might limit the "got focus" condition thingy to one item in the listbox at a time?

thx,
StormX02

orufet
12-10-2002, 08:13 PM
The GotFocus event will fire whenever the listbox receives focus. Try the Click event.

Termor
12-10-2002, 08:30 PM
You can also use the ItemClick event, but if I remember correctly it was kind of flaky. Experiment and see. Keep in mind that the click event can fire if they click anywhere in the control, not just on items. So make sure you check to see that something is selected before trying to use it.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum