+ Reply to Thread
Results 1 to 2 of 2

Handling Errors from Formula result, stored in a variable.

  1. #1
    Registered User
    Join Date
    08-23-2017
    Location
    Budapest
    MS-Off Ver
    2013
    Posts
    2

    Angry Handling Errors from Formula result, stored in a variable.

    I have looked long for this, but i havent found a truly similar post on web in 2 hours. (so now im posting it on 3 forums)

    Scenario:

    Please Login or Register  to view this content.
    ---
    Now if i check the values of -Result- it can either be a number or an error.:
    Debug.Print Result -> 1
    Debug.Print result -> Error 2042

    ---
    I can test -Result- with: IsError(result) and it gives True or False
    ... but even if -Result- IS an error, I cannot get its number.

    Result.Number -> Object or Type error message comes
    so seemingly i cannot use it as in Err.Number

    How can I get the error number of -Result- variable?
    What is in this case -Result- really equal with?


    If i say If Result = ??? Then ... when will it be true if i know that its Error 2042?
    I have tested Case "Error 2042" ; Case Err ; Case Error ; Case Err(2042) ; ...
    None of these showed True for -Result- when it debug.printed Error 2042

    Please enlighten me guys.

  2. #2
    Registered User
    Join Date
    08-23-2017
    Location
    Budapest
    MS-Off Ver
    2013
    Posts
    2

    Re: Handling Errors from Formula result, stored in a variable.

    I got the answer here: https://stackoverflow.com/a/48128024

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula using stored variable
    By fireflydreams in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2015, 10:36 AM
  2. UDF not handling Numbers stored as text
    By scottc_00 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-12-2015, 05:09 PM
  3. [SOLVED] Help with Formula using variable as Date and result as integer, error in my result
    By Elomaldo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2014, 04:20 PM
  4. Correct syntax to add a workbook name that is stored in a variable into a formula
    By lordterrin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-25-2014, 03:46 PM
  5. handling errors
    By saimike in forum Excel General
    Replies: 2
    Last Post: 11-17-2011, 03:48 PM
  6. Help with a Formula to Print a stored variable
    By Modify_inc in forum Excel General
    Replies: 4
    Last Post: 12-16-2010, 09:59 AM
  7. Handling Errors in a Userform
    By jerseyguy1996 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2009, 03:44 PM

Tags for this Thread

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