MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

worksheet_calculate event

  Asked By: Claude    Date: Mar 19    Category: MS Office    Views: 1433

I have send-email macro that I want to call from a worksheet_calculate

I have a formula in cell that enters 1 in cell A1, when a date compare
formula exucutes. If the result of the calculation causes a "1" to be
placed in cell A1, the send-email macro should be called. Mail_CDO is
the name of the send-email macro.

I have played around with this for a long time and I am getting
multiple firings of the called macro.




3 Answers Found

Answer #1    Answered By: Hasad Yilmaz     Answered On: Mar 19

I think someone posted a message to this group a while back quoting
something from John Walkenbach's book stating that the
Worksheet_Calculate event  fires sometimes when you don't expect and
doesn't fire other times when you expect it to. I couldn't find the
post, but it sounds like you are dealing with the same issue. Maybe
you can use some kind of counter or timer to get around the multiple

Answer #2    Answered By: Zakary Thompson     Answered On: Mar 19

Have NO idea if this will help...but thought I'd toss it your
way...(McRitchie is an Excel MVP)...


Answer #3    Answered By: Konrada Schmidt     Answered On: Mar 19

Check out Application.EnableEvents
You may need this within your macro  if the macro itself causes the
worksheet to recalculate more than once. Often, when a macro is fired
by an event  it is a good idea to include the line
Application.EnableEvents=False somewhere near the start of the macro,
not forgetting to restore the status quo with
towards the end of the macro.

Didn't find what you were looking for? Find more on worksheet_calculate event Or get search suggestion and latest updates.