Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How does VBA handle errors?

Avatar of ltdanp22
ltdanp22Flag for United States of America asked on
Microsoft AccessVisual Basic ClassicMicrosoft Development
12 Comments1 Solution386 ViewsLast Modified:
I have 4 workbooks. The first opens the second which opens the third which opens the fourth. When there's an error in any of the workbooks, I'd like my error handler to log the error in a text file and close workbooks 2 - 4.

p. 361 of Access 2003 VBA states: "When there is no error handler in the procedure in which the error occurs, VBA passes the error to the next highest procedure in the call chain."

I was not aware of this. If this is true then I should only need to place the code that closes workbooks 2 - 4 in the error handler of the entry point routine in the first workbook as opposed to every routine in every workbook. Can someone verify whether or not this is true?
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)Flag of United States of America imageDatabase Architect / Application Developer
This problem has been solved!
Unlock 1 Answer and 12 Comments.
See Answers