ID: Q163741
The information in this article applies to:
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
This problem occurs when your macro contains a line of code that is similar to the following:
ActiveWorkbook.DisplayDrawingObjects = xlDisplayShapes
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
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
NOTE: The information that is in the Help topic for the DisplayDrawingObjects property is incorrect.
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 kbprg kbdocerr kbdta KbVBA
Version : WINDOWS:97
Platform : WINDOWS
Last Reviewed: January 7, 1999