XL2000: Function Name Cannot Be the Same As the Module Name (213840)



The information in this article applies to:

  • Microsoft Excel 2000

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.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbdtacode kberrmsg kbprb kbProgramming KB213840