Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable events in the code

Status
Not open for further replies.

novice001

Programmer
Jun 7, 2002
18
US
Hi All
Does anyone know if it's possible to disable/enable event responses from the code?
I have a field that has some code attached to changeValue event, and i have a button that sets some value in that field, but i don't want the field to react on changeValue in this case(but still react if the value is changed by something else).
Is it possible to write something to disable this event before setting new value and enable it after the value is set?
Thank you, any help is greatly appreciated.

 
There may be a simpler way, but this is what came to mind. When you press the button set a variable flag (i.e. fromButton = 1), then have your changeValue event check the flag before proceeding. Don't forget to reset the flag.


Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top