Macro Fails to Run Correctly

  • Thread starter Thread starter JK
  • Start date Start date
J

JK

I have about seven procedures that are written to run in succession from a
worksheet CmdBtn. However, several do not unless I manually run them with
F5. It has worked for me in other applications, so I'm baffled. Plus, the MS
debugger identifies the problem with a Range.ClearContents function which is
the last procedure and yet several procedures before it have failed, so I'm
doubly baffled. And, as stated, they all run without a hitch when run
manually.

Any suggestions? Thank you.

Jim Kobzeff
 
The code you say doesn't run; is it conditional on if statements. If so,
possibly your conditions are not being met.
 
In addition to Tom's suggestion, do you have any 'On Error Resume
Next' or 'On Error goto {somewhere}' statements? If so, unless they
are protect against *expected* errors, lose them. You will find
debugging greatly simplified.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Thank you for the suggestions. Both did contribute in finding the problem.
Seems the sheet must be activated. Strange because it worked fine without
activation up until a week ago.

Thanks again
 

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