|
-
August 13th, 2001, 07:40 PM
#1
Combo Box Click Event
If I'm not wrong, combo box click event must only triggered when the user
clicks on the combo box. But something unsual is happening with my code.
combo box click:
Private Sub cboTrack_Click()
'do something here
End Sub
Private Sub Example()
cboTrack.Text = cboTrack.List(0) '<========= 'I have a breakpoint
here
End Example
Whenever the control is done with;
cboTrack.Text = cboTrack.List(0) '<========= 'I have a breakpoint
here
it goes to combo box click event. But i haven't called it and have no
intension of doing it either.
Is there a way to stop VB to go to combo box click event ofcourse without
deleting the event itself?
Thanks,
Simon
-
August 13th, 2001, 09:56 PM
#2
Re: Combo Box Click Event
That happens when the combo style is set to drop down list. You may need to put in a flag in the click event to process the following code or skip it.
option explicit
dim skipcombo as boolean
private sub cboTrack_click()
if skipcombo = true then 'skip the click event
exit sub
end if
'process this event if skipcombo = false
do something ...
do something else ...
end sub
Private Sub Example()
skipcombo = true
cboTrack.Text = cboTrack.List(0) '<========= 'I have a breakpoint
here
skipcombo = false
End sub
David Paulson
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|