Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error handling
Hello,
Now I getting the hang of making small progjes with VB. I really asked a number of things. 15 years ago, i wrote a lot in LISP for AutoCAD. I always made a sort of error handler which include all variables to reset, and the Prog. to close properly on errors or misuse. Is there also such a thing in VBA .. I like to hear. gr. SwingLeft |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error handling
Sub MySub() On Error Goto proc_err_handler: 'an example of something the code might do temporarily Application.ScreenUpdating = False 'rest of your code proc_tidy_up: 'tear-down code Application.ScreenUpdating = True Exit Sub proc_err_handler: 'some error reporting, for exampl MsgBox "Err number: " & err.Number & vbNewline & _ "Err description: " & err.Description Resume proc_tidy_up End Sub Bob "Swingleft" wrote in message el.net... Hello, Now I getting the hang of making small progjes with VB. I really asked a number of things. 15 years ago, i wrote a lot in LISP for AutoCAD. I always made a sort of error handler which include all variables to reset, and the Prog. to close properly on errors or misuse. Is there also such a thing in VBA .. I like to hear. gr. SwingLeft |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Err.Description as error proc name trail, error handling | Excel Programming | |||
First Error works but Subsequent Error Handling Does Not | Excel Programming | |||
Error handling error # 1004 Run-time error | Excel Programming | |||
Error Handling - On Error GoTo doesn't trap error successfully | Excel Programming | |||
Error handling with a handling routine | Excel Programming |