Results 1 to 2 of 2
Thread: Changing checkbox state with VBA
05-24-04, 13:03 #1Registered User
- Join Date
- Feb 2004
- Charlotte, NC
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.
MichaelMake something idiot proof and someone will make a better idiot...
05-24-04, 22:30 #2Registered User
- 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
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 = Truehttp://www.scirocco.ca/images/banner...occobanner.gif
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!