ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Error Handling (https://www.excelbanter.com/excel-programming/287642-excel-error-handling.html)

brutalmetal

Excel Error Handling
 
Hi!
I am writing some VB code to generate a report from a pivot table dat
in an excel sheet.

I am looking for some error handling code or atleast a good listing o
error numbers and their descriptions. Can you please help me with it

--
Message posted from http://www.ExcelForum.com


BrianB

Excel Error Handling
 
There is lots of info around on this, including VB Editor help
See On Error, Err, Error etc. This code is copied from there whic
could give you a listing of all error codes using a wider range o
numbers:-


'-------------------------------------------------------------
Dim ErrorNumber
For ErrorNumber = 61 To 64 ' Loop through values 61 - 64.
Debug.Print Error(ErrorNumber) ' Print error to Debug window.
Next ErrorNumber
'-------------------------------------------------------------

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 01:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com