Programmically setting Excel checkboxs(Forms Shape object)
Roedd <<Alpha1 wedi ysgrifennu:
Now that I can check the box with help you guys provided but it
appears that there is a macro that runs behind the check boxes that
verifies the onclick event. However I don't seem to be able to access
the properties of the checkboxes on the form object to remove the on
click event, despite disabling the macro it still attempts to call
the Macro named "AnyCheckedBoxClick."
Create a global boolean variable. Call it something like
blnValidationDisabled.
Add a check for the status of the variable at the start of your
AnyCheckedBoxClick code:
Sub AnyCheckedBoxClick()
if not blnValidationDisabled then
<do validation
end if
end sub
Now when you programatically check or unckeck the checkbox, you can set the
varaible:
blnValidationDisabled = true
<code to alter the checked state of the checkbox
blnValidationDisabled = false
HTH
Rob
|