PC Review


Reply
Thread Tools Rate Thread

Can I stop the change event being triggered?

 
 
Michelle
Guest
Posts: n/a
 
      27th Oct 2009
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

 
Reply With Quote
 
 
 
 
Patrick Molloy
Guest
Posts: n/a
 
      27th Oct 2009
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
>

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      27th Oct 2009
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
> >

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      27th Oct 2009
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
 
Reply With Quote
 
Michelle
Guest
Posts: n/a
 
      27th Oct 2009
Thanks - great

M


"Jan Karel Pieterse" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box change event triggered from another file aardvark Microsoft Excel Programming 0 12th Aug 2009 10:36 AM
Why is this Worksheet Change Event triggered? AJ Master Microsoft Excel Programming 7 25th May 2009 12:56 PM
combobox change event triggered without change Jacob Microsoft Excel Programming 0 8th May 2007 03:53 PM
Help - Change Event triggered on File Save As Dee Veloper Microsoft Excel Programming 4 29th Oct 2003 02:16 AM
Change Event not consistently triggered Ronald Dodge Microsoft Access Form Coding 0 16th Sep 2003 12:49 PM


Features
 

Advertising
 

Newsgroups
 


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