Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Friday 22 April 2016

How to Add Error Handing in VBA

Add the following code in your sub or function

On Error GoTo ErrHandler:
'your code will be here
Exit Sub
ErrHandler:
    If err.Number = -2147467259# Then
    MsgBox "Map Sheet is not found in selected workbook"
        Else
        MsgBox err.Description
    End If
End Sub

No comments:

Post a Comment