XL98: Function Returns #VALUE! Error After Running Macro

Last reviewed: February 4, 1998
Article ID: Q180370
The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition

SYMPTOMS

If you call a user-defined (custom) function from a worksheet formula, and then run a Microsoft Visual Basic for Applications macro, the user-defined function may return the #VALUE! error.

CAUSE

This problem occurs if all of the following conditions are true:

  • You create a custom function, and then call it from a worksheet formula.

        -and-
    
  • The custom function uses the Text property for a Range object.

        -and-
    
  • You run another Sub procedure (macro) that deletes a row in the worksheet.

WORKAROUND

To work around this problem, use the Value property instead of the Text property in the custom function.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

You can use the Text property or the Value property with a Range object. The Value property returns the actual underlying cell value, while the Text property returns the formatted value that is displayed in the cell.


Additional query words: XL98 vba
Keywords : xlvbainfo
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbbug
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 4, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.