Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Charlotte, NC

    Question Unanswered: Changing checkbox state with VBA


    I am looking for a way to change the state of a checkbox from true to false or vice versa without triggering the click event for the checkbox. Does anyone know of a way to do this?

    I am using Excel 2000.


    Make something idiot proof and someone will make a better idiot...

  2. #2
    Join Date
    Mar 2004
    Unless you want to use API calls to intercept the event and stop it here is a simple way.

    1) Put an If condition in your Click Event of checkbox with a condition.


    If CheckBox.Enabled Then
    Do the event code
    End If

    In the click event of the checkbox add a code to change the criteria:


    CheckBox.Enabled = False
    CheckBox.Value = True 'Event is triggered here
    CheckBox.Enabled = True

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

Posting Permissions

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