XL97: Names Collection Result Is Incorrect or Returns an Error

ID: Q174201


The information in this article applies to:
  • Microsoft Excel 97 for Windows


SYMPTOMS

When you right-click a worksheet, click Move or Copy to move or copy a worksheet to another workbook, and then run a Visual Basic for Applications procedure that uses the Names collection, the collection returns incorrect results.

In addition, if you use the Count property of the Names collection as an index for the Names object, the following error message appears:

Run-Time error '424'
Object required.


CAUSE

This problem occurs when the following conditions are true:

  • You add a watch expression (click Add Watch on the Debug menu) for the Names collection.


  • -and-

  • You expand the Watch pane to view the Names properties.



WORKAROUND

To work around this problem, do not expand the Watch pane.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

Additional query words:

Keywords : kberrmsg kbprg kbdta KbVBA
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbbug


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