Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Prevent Corollary Event

Hi all,

Setting Application.EnableEvents = false can prevent other events from
happening, but how to achieve the same effect when doing with the controls
such as a textbox
on a form when the textbox is assigned a value without causing Change event
to happen

Clara
--
thank you so much for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Prevent Corollary Event

As you know Application.EnableEvents = false only works for excel events.
hosted object events are controlled by the hosted object. What I would do it
add a variable blnFireEvents and within the event code for the third party
object test for this value and run the event code if required. If you mean
stop internal events on the hosted control from firing then you will have to
look at the documentation for the control.

Something like this:

Private blnFireEvents As Boolean

Private Sub TextBox1_Change()

If blnFireEvents Then
'do stuff
Else
'don't do stuff
End If

End Sub

--
www.alignment-systems.com


"clara" wrote:

Hi all,

Setting Application.EnableEvents = false can prevent other events from
happening, but how to achieve the same effect when doing with the controls
such as a textbox
on a form when the textbox is assigned a value without causing Change event
to happen

Clara
--
thank you so much for your help

Reply
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
Prevent automatic combobox event trigger [email protected] Excel Programming 0 March 9th 06 07:57 PM
prevent event procedure under condition short_n_curly Excel Programming 3 June 27th 05 08:38 PM
VBA problem - prevent event to occur when certain button is clicked blackpablo Excel Programming 0 August 5th 04 10:21 AM
Prevent "standard" key event in userform Oskar[_2_] Excel Programming 5 May 30th 04 12:51 PM
Prevent Change in Event when not needed JK Excel Programming 0 October 13th 03 08:10 PM


All times are GMT +1. The time now is 05:38 PM.

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"