Macro Fails to Run Correctly

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
 
T

Tom Ogilvy

The code you say doesn't run; is it conditional on if statements. If so,
possibly your conditions are not being met.
 
T

Tushar Mehta

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
 
J

JK

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
 
Top