Microsoft KB Archive/213840

= XL2000: Function Name Cannot Be the Same As the Module Name =

Article ID: 213840

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



This article was previously published under Q213840





SYMPTOMS
In Microsoft Excel 2000, if you attempt to run a function that has the same name as a Visual Basic module, and the Visual Basic module is located in the same workbook as the function, you may receive the following error message:

A #NAME! error value is returned to cell A1.



WORKAROUND
Instead of creating a function, create a Sub procedure. A Sub procedure can have the same name as a module without causing an error message.

NOTE: Sub procedures cannot be called from worksheet formulas.

Additional query words: XL2000

Keywords: kbdtacode kberrmsg kbprb kbprogramming KB213840

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.