Results 1 to 3 of 3

Thread: set value of check box

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870

    set value of check box

    Hi,

    how do i set the value of a check box with out firing the click_event?

    Many thanks
    Nick
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  2. #2
    Addicted Member run_GMoney's Avatar
    Join Date
    May 2002
    Location
    Detroit
    Posts
    186
    What event would you like to use to change the value?
    Place Your VBForums Ad Here

  3. #3
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456

    Re: set value of check box

    Originally posted by nswan
    Hi,

    how do i set the value of a check box with out firing the click_event?

    Many thanks
    Nick
    That's how you can stop it ..

    VB Code:
    1. Option Explicit
    2.  
    3. Dim m_blnStopFire As Boolean
    4.  
    5. Private Sub Check1_Click()
    6.     If m_blnStopFire Then m_blnStopFire = False: Exit Sub
    7.     MsgBox "I will never fire unless you click on checkbox itself ... "
    8. End Sub
    9.  
    10. Private Sub Command1_Click()
    11.     m_blnStopFire = True
    12.     Check1.Value = vbChecked
    13. End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width