LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default 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





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 Label Options - Forms Object vs Control Box Object Awrex Excel Discussion (Misc queries) 3 July 17th 09 07:10 PM
Where can I get some clear instructions about setting up forms on Excel Janev New Users to Excel 2 September 21st 06 08:57 AM
shape object on a userform? Alan Ibbotson Excel Programming 5 April 25th 05 01:24 PM
How to hide Excel window when activating a Shape object Yi[_2_] Excel Programming 4 October 8th 03 02:36 PM
How to hide Excel window when activating a Shape object Bob Kilmer Excel Programming 0 September 27th 03 03:51 PM


All times are GMT +1. The time now is 05:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"