Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
View the code in a add-in | Excel Worksheet Functions | |||
View Code question | Excel Discussion (Misc queries) | |||
How do I view the value of a variable in my code? | Excel Programming | |||
View Routing code | Excel Programming | |||
how view a WS code/properties | Excel Programming |