Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JL JL is offline
external usenet poster
 
Posts: 24
Default How to turn off standard control functions

I am writing some arrays that were filled with data from text files into
cells and every time I write to a cell the code jumps to the
Worksheet_Change() function. I do have some conditions in there that get
checked for use in other places but I would like to turn that off for some of
my operations. What is the code for turning off these functions? Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 420
Default How to turn off standard control functions

One way is to just tell excel to stop looking for anything that would fire any
event, do the work and tell it to start looking again.

Application.enableevents = false
'your code that does lots of stuff
application.enableevents = true



JL wrote:

I am writing some arrays that were filled with data from text files into
cells and every time I write to a cell the code jumps to the
Worksheet_Change() function. I do have some conditions in there that get
checked for use in other places but I would like to turn that off for some of
my operations. What is the code for turning off these functions? Thank you!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default How to turn off standard control functions

Daves suggestion is good but if the cells where you check for 'other stuff'
are in a common block you may like to consider at the top of your
worksheet_change sub

Set isect = Application.Intersect(Range("rg1"), Range(Target)) ' where
Target is the standard parameter referring to the actual cell where the
change occurred
If isect Is Nothing Then Exit Sub


--
Ken
"Using Dbase dialects since 82"
"Started with Visicalc in the same year"


"Dave Peterson" wrote:

One way is to just tell excel to stop looking for anything that would fire any
event, do the work and tell it to start looking again.

Application.enableevents = false
'your code that does lots of stuff
application.enableevents = true



JL wrote:

I am writing some arrays that were filled with data from text files into
cells and every time I write to a cell the code jumps to the
Worksheet_Change() function. I do have some conditions in there that get
checked for use in other places but I would like to turn that off for some of
my operations. What is the code for turning off these functions? Thank you!


--

Dave Peterson
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 420
Default How to turn off standard control functions

But if you do use this kind of thing:

Set isect = Application.Intersect(Range("rg1"), Range(Target))

You'd want to use:

Set isect = Application.Intersect(Range("rg1"), Target)
or qualify that "rg1" range:
Set isect = Application.Intersect(me.Range("rg1"), Target)


K_Macd wrote:

Daves suggestion is good but if the cells where you check for 'other stuff'
are in a common block you may like to consider at the top of your
worksheet_change sub

Set isect = Application.Intersect(Range("rg1"), Range(Target)) ' where
Target is the standard parameter referring to the actual cell where the
change occurred
If isect Is Nothing Then Exit Sub



--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to turn off standard control functions

Thank you all very much!

"JL" wrote:

I am writing some arrays that were filled with data from text files into
cells and every time I write to a cell the code jumps to the
Worksheet_Change() function. I do have some conditions in there that get
checked for use in other places but I would like to turn that off for some of
my operations. What is the code for turning off these functions? Thank you!

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
how to turn off standard toolbar, formatting... Microsoft Excel 20 meaganicole Excel Discussion (Misc queries) 4 June 1st 10 08:02 PM
VSB more efficient then standard functions? jan Excel Programming 6 September 15th 08 10:27 PM
Can I use standard Functions with MS Query? CJ Excel Programming 1 December 17th 06 08:10 PM
standard functions not renognized itarnak[_8_] Excel Programming 1 October 24th 05 11:44 AM
Want to use standard excel functions in vb Mark Excel Programming 3 May 18th 05 03:22 AM


All times are GMT +1. The time now is 11:02 AM.

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"