View Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
Application.EnableEvents = False
do_your_stuff
Application.EnableEvents = True
Exit Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top