Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Listing of error codes

Does anyone have a function or some code that contains the most common errors
so that when we create new macro's we can use a function or something when an
error happens it pulls up the correct description of the error? I am not
very good at this so if you have any other idea's please let me know.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Listing of error codes

You can use err.Description to get a (short) text version of the error.

Tim

"Rookie_User" wrote in message ...
Does anyone have a function or some code that contains the most common errors
so that when we create new macro's we can use a function or something when an
error happens it pulls up the correct description of the error? I am not
very good at this so if you have any other idea's please let me know.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Listing of error codes

The Err object has a variety of properties, .Number, .Description, .Source
etc. that you read in an error trap:
On Error Goto Handle
'Code
Exit Function/sub
Handler:
With Err.
Msgbox Number & vbNewLine & .description & vbnewline & .source
'Raise your own error
.Raise vbObjectError + 513, "ThisFunction","Invalid something"
End With

NickHK

"Rookie_User" wrote in message
...
Does anyone have a function or some code that contains the most common

errors
so that when we create new macro's we can use a function or something when

an
error happens it pulls up the correct description of the error? I am not
very good at this so if you have any other idea's please let me know.



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
Error Codes Banura Excel Worksheet Functions 1 May 22nd 08 09:08 AM
Excel Error codes Carl Excel Discussion (Misc queries) 1 December 9th 04 04:39 PM
VB Error Codes - where to look? Jack Excel Programming 6 January 27th 04 02:44 AM
Syntax error on codes mary Excel Programming 1 January 19th 04 09:54 PM
Syntax error on codes mary Excel Programming 3 January 19th 04 06:42 PM


All times are GMT +1. The time now is 11:38 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"