Applies To
Arc Object, Arcs Collection, Button Object, Buttons Collection, Chart Object, ChartObject Object, ChartObjects Collection, CheckBox Object, DialogFrame Object, Drawing Object, DrawingObjects Collection, Drawings Collection, DropDown Object, DropDowns Collection, EditBox Object, EditBoxes Collection, GroupBox Object, GroupBoxes Collection, GroupObject Object, GroupObjects Collection, Label Object, Labels Collection, Line Object, Lines Collection, ListBox Object, ListBoxes Collection, OLEObject Object, OLEObjects Collection, OptionButton Object, OptionButtons Collection, Oval Object, Ovals Collection, Picture Object, Pictures Collection, Range Object, Rectangle Object, Rectangles Collection, ScrollBar Object, ScrollBars Collection, Spinner Object, Spinners Collection, TextBox Object, TextBoxes Collection.
Description
Copies the object to the Clipboard as a Picture. Syntax 2 is used for the Chart object. Syntax 1 is used for all other objects.
Syntax 1
object.CopyPicture(appearance, format)
Syntax 2
object.CopyPicture(appearance, format, size)
object
Required. The object to copy.
appearance
Optional. Specifies how the picture should be copied. If xlScreen or omitted, the picture is copied as closely as possible to the picture displayed on the screen. If xlPrinter, the picture is copied as it would be printed.
format
Optional. Specifies the format of the picture (one of xlPicture or xlBitmap). If omitted, picture format is used.
size
Optional. Specifies the size of the copied picture when the object is a chart that is on a chart sheet (not embedded on a worksheet). If xlPrinter or omitted, the picture is copied as closely as possible to the printed size. If xlScreen, the picture is copied as closely as possible to the size as displayed on the screen.
Remarks
This method creates a Picture object on the Clipboard, regardless of the copied object.
If you copy a range, it must be made up of adjacent cells.
See Also
Copy Method, Paste Method.
Example
This example copies a screen image of cells A1:D4 on Sheet1 to the Clipboard, and then it pastes the bitmap in another location on Sheet1.
Worksheets("Sheet1").Range("A1:D4").CopyPicture xlScreen, xlBitmap Worksheets("Sheet1").Paste _ destination:=Worksheets("Sheet1").Range("E6")