Avoiding click event ....
Hi Friends,
I am using a combobox, inwhich I filled out items. At the end when I set the listindex property of combo, automatically CLICK event is get fired. So my question is How I can avoid the click event to get fired, if I don't want for some time....
Thanx...
Anand...
Re: Avoiding click event ....
Hi,
I guess there is no way you can stop the click event from firing when you set listindex of a combobox. Only way is a work around.
Have a boolean member variable , something like m_bDontProcessClick
Just before you set the value of list index, set this flag to true : Like
m_bDontProcessClick = true
cmbMyCombo.ListIndex = i
m_bDontProcessClick = False ' <<-- Important LINE!
and in the click event, check for this flag and exit if true.
private sub cmbMyCombo_Click
if m_bDontProcessClick then exit sub
.... rest of the normal processing follows..
end sub
Be sure to reset the flag, otherwise your legitimate clicks also will not be processed!
Ravi