April 2006
Beginner
1114 pages
98h 16m
English
shape.Duplicate( )
Copies a shape and returns a reference to the new Shape object. The following code makes a copy of the first shape on a worksheet, then moves the copy to the left:
Sub CopyShape( )
Dim ws As Worksheet, s As Shape
Set ws = ActiveSheet
Set s = ws.Shapes(1)
' Make copy.
Set s = s.Duplicate
' Move copy.
s.IncrementLeft 100
End SubRead now
Unlock full access