#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default View Code

I stuck some code on the tab of a worksheet (right-click the tab and select
view code). The Sub is called worksheet_calculate and it checks for the
value of a named cell and if it does not equal zero, an error message pops
up. But the problem is that when running code I spawn a new spreadsheet and
add a bunch of data to it but after EACH LINE OF CODE the sub
worksheet_calculate sub is called. I don't know why? If i debug and look at
the spreadsheet with the worksheet_calculate sub I am not on the tab that has
the code. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default View Code

Application.EnableEvents = False
do_your_stuff
Application.EnableEvents = True
Exit Sub
--
Gary''s Student - gsnu200740


"Mike H." wrote:

I stuck some code on the tab of a worksheet (right-click the tab and select
view code). The Sub is called worksheet_calculate and it checks for the
value of a named cell and if it does not equal zero, an error message pops
up. But the problem is that when running code I spawn a new spreadsheet and
add a bunch of data to it but after EACH LINE OF CODE the sub
worksheet_calculate sub is called. I don't know why? If i debug and look at
the spreadsheet with the worksheet_calculate sub I am not on the tab that has
the code. Any ideas?

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
View the code in a add-in sh0t2bts Excel Worksheet Functions 9 April 3rd 23 07:33 PM
View Code question Doug Waters 03/03/08 Excel Discussion (Misc queries) 6 July 17th 08 07:51 PM
How do I view the value of a variable in my code? Bill_S Excel Programming 0 April 27th 05 11:39 PM
View Routing code Mike R. Excel Programming 1 January 20th 05 06:29 AM
how view a WS code/properties Steven Excel Programming 5 April 19th 04 05:44 PM


All times are GMT +1. The time now is 06:23 PM.

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"