XL98: How to Control the Placement of Objects in MS Excel 98Last reviewed: February 2, 1998Article ID: Q178989 |
The information in this article applies to:
SUMMARYIn Microsoft Excel 98 Macintosh Edition, you can control how charts, drawing objects, AutoShapes, and other objects in a worksheet are placed (attached to the cells below them). This article explains how to set the Placement property for objects in worksheets.
MORE INFORMATIONObjects in worksheets can be attached to the cells below them by using one of the three placement styles that are listed in the following table.
Placement Style xlConstant ----------------------------------------------- Move and size with cells xlMoveAndSize Move but don't size with cells xlMove Don't move or size with cells xlFreeFloatingYou can control how objects are attached to cells by using the Format dialog box or by using Visual Basic for Application code.
Using the Format Dialog Box to Control PlacementTo format the placement style for an object, follow these steps:
Using Visual Basic Code to Control PlacementYou can use the Placement property in Visual Basic for Applications to control the placement style of an object. Examples: Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/supportnet/refguide/The following examples set the placement style for a form, a chart, or an object:
'A button or other Forms object. ActiveSheet.Shapes("Button 1").Placement = xlMoveAndSize 'An embedded chart. ActiveSheet.ChartObjects("Chart 4").Placement = xlMove 'A drawing object or AutoShape. ActiveSheet.Shapes("Rectangle 3").Placement = xlFreeFloating REFERENCESFor more information about object placement in Microsoft Excel 98 Macintosh Edition, click the Office Assistant, type "object placement" (without the quotation marks), click Search, and then click to view "Prevent objects from moving and sizing with cells." NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If MS Excel Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q120802 TITLE : Office: How to Add/Remove a Single Office Program or Component |
Additional query words: XL98
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |