View Full Version : [vb] Is there a way to 'freeze' the code in a combo box

Bry Man
01-30-2005, 03:08 AM

Sorry for the unusual wording there in the title, I couldnt think of any other word to describe what im going after. Here is what im trying to do though. I have a form with 10 combo boxes on it, each combo box has about 10 or so options. Each option under the combo box has code in it that I dont exactly want to be executed immediately on selection but rather later on during the run time, is there a way I can prevent the code from being executed on selection of an option and then enable it later?

Bry Man
01-30-2005, 04:24 AM
Heh, I solved my own problem.

Dim Bleh As Boolean

Private Sub Command1_Click()
If Bleh = True Then
If Combo1.Text = "woot" Then
MsgBox ("woot")
End If
End If

End Sub

The code only functions if bleh = true which works perfectly for what I wanted =)