Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Sub erroneously calls another sub

Greetings !

In my workbook, I have a 'change event' macro (started with the line
"Private Sub Worksheet_Change(ByVal Target as Range"). After much work, this
macro runs just fine.

My problem is that a totally separate macro, which I call
"Clear_Glass_Data", somehow calls the 'change event' macro into play. I'm
guessing that this happens because the "Clear_Glass_Data" changes many cell
values from TRUE to FALSE, therefore causing an "event" change. Is there a
way of isolating my "Clear_Glass_Data" macro so that it can't see or call
any other macros??

Thanks for your help,

Jay N.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sub erroneously calls another sub


Jay,

Events can be disabled in excel by use of Application.EnableEvents

You must ALWAYS remember to enable events when you have finished.

I normally do it like this ...

Application.EnableEvents = False
Your update code
Application.EnableEvents = True

and
dont forget to put in an error trap that has
Application.EnableEvents = True included.


I would imagine that this code would be placed in your Clear_Glass_Dat
macro

--
Kiera

Born ignorant and still perfecting the ar
-----------------------------------------------------------------------
Kieran's Profile: http://www.excelforum.com/member.php...nfo&userid=124
View this thread: http://www.excelforum.com/showthread.php?threadid=27144

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Sub erroneously calls another sub

Kieran,

Thanks so much for your help! Your suggestion works perfectly, and I have
learned something new.

Jay


"Kieran" wrote in message
...

Jay,

Events can be disabled in excel by use of Application.EnableEvents

You must ALWAYS remember to enable events when you have finished.

I normally do it like this ...

Application.EnableEvents = False
Your update code
Application.EnableEvents = True

and
dont forget to put in an error trap that has
Application.EnableEvents = True included.


I would imagine that this code would be placed in your Clear_Glass_Data
macro.


--
Kieran

Born ignorant and still perfecting the art
------------------------------------------------------------------------
Kieran's Profile:
http://www.excelforum.com/member.php...fo&userid=1247
View this thread: http://www.excelforum.com/showthread...hreadid=271446



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
Phone calls Paduan learner Excel Discussion (Misc queries) 1 February 12th 09 11:07 PM
Calls per Day Nate Excel Discussion (Misc queries) 1 September 17th 08 09:59 PM
Y-Axis Auto-Scale Min Erroneously Set At Zero mvagnier Charts and Charting in Excel 2 April 24th 07 03:44 PM
XLA calls dll rodt Excel Programming 2 November 17th 03 10:08 PM
VBA Calls Rob Bovey Excel Programming 4 August 23rd 03 05:32 AM


All times are GMT +1. The time now is 09:38 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"