The information in this article applies to:
SYMPTOMSWhen you run a Visual Basic for Applications macro in Microsoft Excel 97, your macro may behave incorrectly if it accesses the Parent property of a Style object ("Styles.Parent"). CAUSEThis may occur because the Parent property of a Style object is different in Microsoft Excel 97 than it is in earlier versions of Microsoft Excel:
This behavior is by design of Microsoft Excel 97. The behavior in earlier
versions of Microsoft Excel is incorrect.
WORKAROUND
If your macro contains code that accesses the Parent property of a Style
object, and you expect the Parent property to return the Application
object, you must remove "Parent" from your macro and replace it with
"Application". If you do this, the macro will work correctly in Microsoft
Excel versions 5.0, 7.0 and 97.
You would change this line to:
MORE INFORMATION
In Microsoft Excel, almost every type of object has a Parent property. The
Parent property of an object returns the larger object that contains it.
For example, ActiveCell.Parent returns the worksheet that contains the
active cell.
Additional query words: XL97 8.00
Keywords : kbprg kbdta KbVBA xlvbmigrate |
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |