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

ID: Q113952


The information in this article applies to:
  • Microsoft Visual Basic, Application Edition, version 1.0
  • Microsoft Excel for Windows, version 5.0


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.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new book in Excel by choosing New from the File menu.


  2. Insert a new module by choosing Macro and then Module from the Insert menu.


  3. Add the following code to the new module:
    
       Sub C3000 


  4. When you press the ENTER key, you'll see the error "Invalid procedure name." Then the line of code turns red.


Additional query words:

Keywords :
Version : :1.0; WINDOWS:5.0
Platform : WINDOWS
Issue type :


Last Reviewed: October 18, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.