Results 1 to 7 of 7

UDF works in 2003, but fails in 2007

Threaded View

  1. #1
    Registered User
    Join Date
    04-02-2010
    Location
    Iver, England
    MS-Off Ver
    Excel 2007 & 2003
    Posts
    4

    UDF works in 2003, but fails in 2007

    I have a user defined function which works in Excell 2003, but fails in Excel 2007.

    Function IsFormula(Check_Cell As Range)
    IsFormula = Check_Cell.HasFormula
    End Function
    I have some code which copies a range from another workbook and then pastes this into the open workbook.
    The user can choose whether to paste the data as "Values" or as "Link".
    There is a cell in the worksheet which uses the "IsFormula" function to check the first cell of the pasted range to see if it contains Data (i.e. it is pasted values) or a Formula (i.e. it is linked) and then display a message to let the user know that they are currently using linked data or pasted values.
    The whole thing worked perfectly in Excel 2003, but in Excel 2007 when the range is pasted, the "IsFormula" function gives a "#VALUE!" error. At this point F9 (recalc) sometimes cures the problem, but not always.
    Copying the data in the referenced cell to another cell, then copying back again also cures the problem.

    Any explanation of what is going on and how to solve it would be much appreciated.
    TIA
    Peter Ross
    Last edited by Puff_Adder; 04-05-2010 at 06:23 PM.

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