Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all...
I am changing the value of a checkbox in code... and I need to suppress the click event when doing so. How might I do this? In other words, changing the value of a checkbox triggers the .click event, and I need to prevent this... Thanks! M |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
application.enableevents = false
BIG NOTE be very sure to reenable events with application.enableevents = true or else events will not function AT ALL. "rci" wrote: Hi all... I am changing the value of a checkbox in code... and I need to suppress the click event when doing so. How might I do this? In other words, changing the value of a checkbox triggers the .click event, and I need to prevent this... Thanks! M |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.EnableEvents only works on Excel events, not on the events
associated with msforms control - a completely different library. -- Regards, Tom Ogilvy "ben" wrote in message ... application.enableevents = false BIG NOTE be very sure to reenable events with application.enableevents = true or else events will not function AT ALL. "rci" wrote: Hi all... I am changing the value of a checkbox in code... and I need to suppress the click event when doing so. How might I do this? In other words, changing the value of a checkbox triggers the .click event, and I need to prevent this... Thanks! M |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One technique is to declare a public variable at the top of a general module
Public bBlockEvents as Boolean then in the click event of the control Private Sub Checkbox1_Click() if bBlockEvents then exit sub ' you current code End Sub Then in the code that would trigger the event bBlockEvents = True ' code that would trigger the event bBlockEvents = False so anytime you want to block events, set the flag (bBlockEvents) to true Every event procedure (that you want to be able to block) must check the value of the flag as the first thing and exit if it is true. -- Regards, Tom Ogilvy "rci" wrote in message ... Hi all... I am changing the value of a checkbox in code... and I need to suppress the click event when doing so. How might I do this? In other words, changing the value of a checkbox triggers the .click event, and I need to prevent this... Thanks! M |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Suppressing startup routine | Excel Discussion (Misc queries) | |||
Hi all!! Suppressing the "Do you want to save changes" | Excel Worksheet Functions | |||
Suppressing output | Excel Programming | |||
Suppressing output | Excel Programming | |||
Suppressing messages | Excel Programming |