ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I stop the change event being triggered? (https://www.excelbanter.com/excel-programming/435469-can-i-stop-change-event-being-triggered.html)

Michelle

Can I stop the change event being triggered?
 
On my user form, I want Control1 to effect the value of Control2, but when
it does, I don't want the change event for Control2 to be triggered.

Enable events doesn't work

Can I temporarily switch off the change event, then change the control then
switch it back on?

thanks

M


Jan Karel Pieterse

Can I stop the change event being triggered?
 
Hi Michelle,

On my user form, I want Control1 to effect the value of Control2, but when
it does, I don't want the change event for Control2 to be triggered.

Enable events doesn't work

Can I temporarily switch off the change event, then change the control then
switch it back on?


See:

http://www.jkp-ads.com/Articles/NoEvents00.asp

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com


Patrick Molloy[_2_]

Can I stop the change event being triggered?
 
Applicaton.EnableEvents = FALSE

should work

"Michelle" wrote:

On my user form, I want Control1 to effect the value of Control2, but when
it does, I don't want the change event for Control2 to be triggered.

Enable events doesn't work

Can I temporarily switch off the change event, then change the control then
switch it back on?

thanks

M


Jan Karel Pieterse

Can I stop the change event being triggered?
 
Hi Patrick,

Applicaton.EnableEvents = FALSE

should work


Not for userform control events.

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com


Patrick Molloy[_2_]

Can I stop the change event being triggered?
 
apologies - I misread the question. you could create a 'flag' to exit
control2's event

say bIgnore as boolean

in control1 set thios to TRUE, make the change, then set it back to false
in control2 make the first line
If bIgnore then Exit Sub





"Patrick Molloy" wrote:

Applicaton.EnableEvents = FALSE

should work

"Michelle" wrote:

On my user form, I want Control1 to effect the value of Control2, but when
it does, I don't want the change event for Control2 to be triggered.

Enable events doesn't work

Can I temporarily switch off the change event, then change the control then
switch it back on?

thanks

M


Dave Peterson

Can I stop the change event being triggered?
 
Check your other thread.

Michelle wrote:

On my user form, I want Control1 to effect the value of Control2, but when
it does, I don't want the change event for Control2 to be triggered.

Enable events doesn't work

Can I temporarily switch off the change event, then change the control then
switch it back on?

thanks

M


--

Dave Peterson

Michelle

Can I stop the change event being triggered?
 
Thanks - great

M


"Jan Karel Pieterse" wrote in message
...
Hi Michelle,

On my user form, I want Control1 to effect the value of Control2, but
when
it does, I don't want the change event for Control2 to be triggered.

Enable events doesn't work

Can I temporarily switch off the change event, then change the control
then
switch it back on?


See:

http://www.jkp-ads.com/Articles/NoEvents00.asp

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com




All times are GMT +1. The time now is 03:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com