Microsoft KB Archive/113952

= PRB: Sub Name Can't Be Valid Cell Reference in Excel VBApp =

Article ID: 113952

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Excel 5.0 Standard Edition

-



This article was previously published under Q113952



SYMPTOMS
Certain Sub or Function procedure names may generate an "Invalid Procedure Name" error in Visual Basic, Applications Edition in Excel even though the syntax is correct.



CAUSE
When creating new modules or renaming existing modules in Excel, Visual Basic, Applications Edition rejects any Sub or Function that is a valid cell reference regardless of whether you are using A1 or R1C1 referencing.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Create a new book in Excel by choosing New from the File menu. Insert a new module by choosing Macro and then Module from the Insert menu.  Add the following code to the new module: Sub C3000  When you press the ENTER key, you'll see the error "Invalid procedure name." Then the line of code turns red.

Keywords: kbprb KB113952

-

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

© Microsoft Corporation. All rights reserved.