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

Hi all,

How to disable a change event when a control is assigned a value.

Clara
--
thank you so much for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default disable event

if ocontrol.value = true then
application.enableevents=false
'do your stuff
end if
application.enableevents=true

hth!
susan


On May 11, 12:18 pm, clara wrote:
Hi all,

How to disable a change event when a control is assigned a value.

Clara
--
thank you so much for your help



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default disable event

Hi Susan,

Thank you very much. What I mean is how to disable an change event on a form.

Clara
--
thank you so much for your help


"Susan" wrote:

if ocontrol.value = true then
application.enableevents=false
'do your stuff
end if
application.enableevents=true

hth!
susan


On May 11, 12:18 pm, clara wrote:
Hi all,

How to disable a change event when a control is assigned a value.

Clara
--
thank you so much for your help




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default disable event

hmmmmmmmmmmmm
the only way i can think of doing that is by making the change event
NOT a change event, and calling it with an if-statement.....
well, no, i don't think that will work, either. because you can't use
any kind of an if-statement, because the change event will trigger
before the coding gets to the if-statement.

i don't think you can, once you've written it, without commenting it
out!
:)
maybe you could make the change coding more variable with an if-
statement in it........

sub txtOne_change ()

if txtOne.value <0 then
call my_real_change_sub
end if

so then if it doesn't meet your qualifications, it simply won't do
anything.
i don't know if this will have an effect on your project, though, for
speed or size issues, because it will trigger every time you make a
change in that txtbox, but maybe only fire occasionally. i've done
similar things before in worksheet_changes, & it doesn't seem to
effect anything, but they haven't been big involved projects.
hth!
:)
susan



On May 11, 4:41 pm, clara wrote:
Hi Susan,

Thank you very much. What I mean is how to disable an change event on a form.

Clara
--
thank you so much for your help



"Susan" wrote:
if ocontrol.value = true then
application.enableevents=false
'do your stuff
end if
application.enableevents=true


hth!
susan


On May 11, 12:18 pm, clara wrote:
Hi all,


How to disable a change event when a control is assigned a value.


Clara
--
thank you so much for your help- Hide quoted text -


- Show quoted text -



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
Disable SelectionChange Event BillCPA Excel Discussion (Misc queries) 2 February 17th 06 06:45 PM
Disable Click event Ashman Excel Programming 4 August 22nd 05 07:50 PM
Disable event macro while Auto_open() run Sunil Patel Excel Programming 2 June 30th 05 06:41 PM
Disable Change Event in Form No Name Excel Programming 5 October 31st 03 08:23 PM
Disable Worksheet change event Tim[_14_] Excel Programming 4 July 15th 03 01:27 AM


All times are GMT +1. The time now is 08:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"