Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
access vba course - error checking

Forum home » Delegate support and help forum » Microsoft VBA Training and help » access vba course - Error checking

access vba course - Error checking

ResolvedVersion Standard

John has attended:
Excel VBA Intro Intermediate course

Error checking

What are the three ways of error checking?

RE: Error checking

Hi John

The three ways of error cheching are:

On Error Resume Next - Go to the next line of code

ON Error Exit Sub - Exit the routine where this line is

On Error Go To EH - Go to an error routine at the end of the routine where the error checking is taking place

Regards

Carlos

VBA tip:

Use VbNullString instead of

When needing to default a String variable back to it's default of "" use vbNullString as in the following example:

Sub ClearText()

Dim strEmpName As String

strEmpName = "John Smith"
MsgBox strEmpName

strEmpName = vbNullString
MsgBox strEmpName

End Sub

View all VBA hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.