Microsoft KB Archive/163741

= XL97: Cannot Use xlDisplayShapes with DisplayDrawingObjects =

Article ID: 163741

Article Last Modified on 10/21/2000

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q163741



SYMPTOMS
When you run a Visual Basic for Applications macro that refers to the DisplayDrawingObjects property of Microsoft Excel 97, you may receive the following error message:

Compile error:

Type mismatch



CAUSE
This problem occurs when your macro contains a line of code that is similar to the following: ActiveWorkbook.DisplayDrawingObjects = xlDisplayShapes



WORKAROUND
To prevent this problem from occurring, use the constant xlAll instead of the constant xlDisplayShapes. For example, change the sample line of code to the following: ActiveWorkbook.DisplayDrawingObjects = xlAll



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem no longer occurs in Microsoft Excel 2000.

NOTE: The information that is in the Help topic for the DisplayDrawingObjects property is incorrect.



MORE INFORMATION
In Microsoft Excel, use the DisplayDrawingObjects property to determine how drawing objects are displayed in a workbook. You can use the following constants when you set the DisplayDrawingObjects property.   Constant         Description xlAll           Show all shapes xlPlaceholders  Show placeholders for each shape xlHide          Hide all shapes In Microsoft Excel 97, the Help topic for DisplayDrawingObjects indicates that you can use the constant xlDisplayShapes instead of the constant xlAll. This information is incorrect.

Additional query words: 97 XL97

Keywords: kberrmsg kbprogramming kbdocerr KB163741

-

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

© Microsoft Corporation. All rights reserved.