Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    California
    Posts
    511
    Thanks
    1
    Thanked 1 Time in 1 Post

    [vb] Is there a way to 'freeze' the code in a combo box

    Hey,

    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?
    When traveling down the road of life, Try not to drag your face in the gravel.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    California
    Posts
    511
    Thanks
    1
    Thanked 1 Time in 1 Post
    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 =)
    When traveling down the road of life, Try not to drag your face in the gravel.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •