Drawings Collection Object

Description

A collection of all the Drawing objects (graphic object created by the Freehand, Freeform, or Filled Freeform buttons) on the specified chart sheet, dialog sheet, or worksheet.

Accessors

Use the Drawings method with an argument to access a single member of the collection or without an argument to access the entire collection at once. The following example deletes all of the drawings on worksheet one in the active workbook.


Worksheets(1).Drawings.Delete

Use the Add method to create a new drawing and add it to the collection. You must specify two initial vertices for the drawing. Use the AddVertex method to add vertices once the drawing has been created. The following example creates a new drawing.


With Worksheets("sheet1").Drawings.Add(10, 10, 100, 100, False)
    .AddVertex 150, 150
    .AddVertex 200, 150
End With

You can use the macro recorder to create a more complex example. Turn on the macro recorder (click Record Macro on the Tools menu), and draw a complex freeform drawing. Then turn off the macro recorder, and examine the recorded Visual Basic code.

Properties

Application Property, Border Property, Count Property, Creator Property, Enabled Property, Height Property, Interior Property, Left Property, Locked Property, OnAction Property, Parent Property, Placement Property, PrintObject Property, Shadow Property, Top Property, Visible Property, Width Property, ZOrder Property.

Methods

Add Method (Drawings Collection), BringToFront Method, Copy Method, CopyPicture Method, Cut Method, Delete Method, Duplicate Method, Group Method, Item Method, Reshape Method, Select Method, SendToBack Method.