VBA Error Handling

How To Parse A Flat File In Excel VBA

In another post I demonstrated how to access a file on your computer using the MS Office Library. Here it is if you don’t know what I’m talking about. In this post, I am going to show you how to access the file and load it into your spreadsheet. I will do the same thing […]

Continue Reading

How do I handle errors in Access VBA code?

I am going to give you the answer to “How do I handle errors in Access VBA code?” In my opinion there are 2 ways to handle errors: 1. Avoid the potential for an error to occur. 2. Handle the error in your code. Number 1 – If you have a control on your form […]

Continue Reading

Find Error Line Number in VBA With Erl

In this post you are going to find out a way of handling errors in your code with the Erl function. Erl displays the last label before the error Another alternative error handling solution is using labels at each point in long procedure. Here we get a random error: Here is the code behind the […]

Continue Reading

Error In Loading DLL And DAO DLL Download

The other day I was doing a database modification for a long time customer, and I was compiling their database, when the compilation failed at a line of VBA code calling for a DAO object. FYI: I originally designed this bit of code for a prior Access version and now they had upgraded to an […]

Continue Reading

VBA Error Handling PT2

In this VBA Error Handling set I’ll talk about using the error object Here is a chart referencing the Error object’s properties for you to reference: Property Description Number The number of the error. Description The description of the error. Source The name of the object or application that originally generated the error. …CODE EXAMPLE […]

Continue Reading

VBA Error Handling PT1

In this VBA Error Handling set (1 & 2) we’ll talk about: Trapping run-time errors Creating error handlers Using the error object There are 3 main types of VBA Errors: 1. Syntax Errors 2. Logic Errors 3. Run-Time Errors Syntax errors result when the logic is misspelled, or a wrong keyword is used. The VBA […]

Continue Reading