Search code examples
visual-studioerror-handlingsyntax-errorbasic

Visual Basic Input Error Messages


I'm currently working on a project and I need some example VB input error messages.

It has been a long time since I have dealt with VB and I was wondering if anyone would mind sending some screenshots of input error messages? Such as and arithmatic overflow error message.

Cheers


Solution

  • On Error Resume Next
    For x = 0 to 2000
        err.raise x
        If not err.description = "Unknown runtime error" then
            wscript.echo err.number & " " & err.description
        End If
        err.clear
    Next
    

    Help has a full list of runtime and syntax errors. Above vbs prints out all runtime errors.