Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Trapping in Macro

Status
Not open for further replies.

herrld

Technical User
May 10, 2001
69
US
I have a macro with the following steps:
Echo off
SetWarnings no
OpenQuery - opens/runs make table query
Close - closes same query, auto save
(open and close continues for 4 queries)
MsgBox - Processing Complete!
Close - closes the macro.

I'm looking for a way to trap any errors that may occur during the process. I don't want the Processing Complete MsgBox to appear, if in fact, the processing errored out.

Visual Basic is not my forte, so anything VB related would have to be a cut and paste type of operation.

Thanks,
Linda
Linda
 
Macros have no error trapping. Thats the bad news.

The good news is you can right click on the Macro, Choose save as, and choose convert to VB Module. During the process there is are options to choose comments and error handling!!!

Then, in whatever you used to call you macro from, change the event to reference your newly created code. Tyrone Lumley
augerinn@gte.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top