Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Err.Description as error proc name trail, error handling Neal Zimm Excel Programming 4 February 25th 10 08:07 AM
First Error works but Subsequent Error Handling Does Not Edwin Kelly Excel Programming 2 May 20th 09 02:40 PM
Error handling error # 1004 Run-time error [email protected] Excel Programming 3 May 20th 08 02:23 PM
Error Handling - On Error GoTo doesn't trap error successfully David Excel Programming 9 February 16th 06 05:59 PM
Error handling with a handling routine ben Excel Programming 0 March 15th 05 03:01 PM


All times are GMT +1. The time now is 06:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"