+ Reply to Thread
Results 1 to 4 of 4

List of Runtime Error Codes

  1. #1
    Forum Contributor
    Join Date
    03-24-2005
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    378

    List of Runtime Error Codes

    I thought I had seen a VBA routine that would return a listing of the VBA Runtime error codes and what they mean.

    I know I have seen such a routine in Access97 VBA, but am not sure it will work in Excel.

    I am not sure this is even possible, but if it is would it be possible to post the code that will return a list of the codes and what they mean?

    If it isn't possible, please let me know that as well.

    One more thing...
    This is not a cross post, as I had posed a similar question in the Miscellaneous Forum, but I deleted that post as I realized it was in the wrong forum.
    Thanks!
    Dennis

    I am using Windows 7 and Office 2007, all of my posts are based on this.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Does this link help

    http://support.microsoft.com/kb/146864

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    03-24-2005
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    378

    Thank You!

    This is the list I was looking for.

    For some reason I thought there was a VBA routine that would return the list to an Excel sheet, but this works for me!!

  4. #4
    Registered User
    Join Date
    08-02-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Lightbulb Macro to get the list of runtime errors

    Hello,
    Sorry to unearth this old thread.

    Quote Originally Posted by DCSwearingen View Post
    For some reason I thought there was a VBA routine that would return the list to an Excel sheet
    Indeed there is a way in Excel to programmatically retrieve a listing of all VBA built-in runtime errors that are available on your platform. For example, you can paste the code below in a module of an empty workbook (successfully tested in Excel 2007).

    Note that I parse error codes from 1 to 1000 (see variable MaxErrNo): that’s because, in my Excel 2007, the highest built-in error code is 746. But you can actually parse the error codes up to 65535 (see the link already posted by VBA Noob), it will just take longer to execute the macro.

    Please Login or Register  to view this content.
    Of course this could be improved by handling unexpected errors, adding a button on the 1st worksheet, displaying progress, storing the error codes and descriptions in a Dictionary object, etc.
    Last edited by MSC_GG; 08-21-2013 at 09:15 PM. Reason: Changed the title

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1