Share via


CopyPicture Method [Excel 2003 VBA Language Reference]

CopyPicture method as it applies to the Range object.

Copies the selected object to the Clipboard as a picture. Variant.

expression.CopyPicture(Appearance, Format)

expression Required. An expression that returns one of the above objects.

XlPictureAppearance

XlPictureAppearance can be one of these XlPictureAppearance constants.
xlPrinter. The picture is copied as it will look when it's printed.
xlScreendefault. The picture is copied to resemble its display on the screen as closely as possible

XlCopyPictureFormat

XlCopyPictureFormat can be one of these XlCopyPictureFormat constants.
xlBitmap
xlPicturedefault

CopyPicture method as it applies to the ChartObject, ChartObjects, OLEObject, and OLEObjects objects.

Copies the selected object to the Clipboard as a picture. Variant.

expression.CopyPicture(Appearance, Format)>

expression Required. An expression that returns one of the above objects.

XlPictureAppearance

XlPictureAppearance can be one of these XlPictureAppearance constants.
xlPrinter. The picture is copied as it will look when it's printed.
xlScreendefault. The picture is copied to resemble its display on the screen as closely as possible

XlCopyPictureFormat

XlCopyPictureFormat can be one of these XlCopyPictureFormat constants.
xlBitmap
xlPicturedefault

CopyPicture method as it applies to the Chart object.

Copies the selected object to the Clipboard as a picture.

expression.CopyPicture(Appearance, Format, Size)

expression Required. An expression that returns one of the above objects.

XlPictureAppearance

XlPictureAppearance can be one of these XlPictureAppearance constants.
xlPrinter. The picture is copied as it will look when it's printed.
xlScreendefault. The picture is copied to resemble its display on the screen as closely as possible

XlCopyPictureFormat

XlCopyPictureFormat can be one of these XlCopyPictureFormat constants.
xlBitmap
xlPicturedefault

XlPictureAppearance

XlPictureAppearance can be one of these XlPictureAppearance constants.
xlPrinterdefault. The picture is copied to match its printed size as closely as possible.
xlScreen. The picture is copied to match the size of its display on the screen as closely as possible.

CopyPicture method as it applies to the Shape object.

Copies the selected object to the Clipboard as a picture.

expression.CopyPicture(Appearance, Format)

expression Required. An expression that returns one of the above objects.

XlPictureAppearance

XlPictureAppearance can be one of these XlPictureAppearance constants.
xlPrinter. The picture is copied as it will look when it's printed.
xlScreendefault. The picture is copied to resemble its display on the screen as closely as possible

XlCopyPictureFormat

XlCopyPictureFormat can be one of these XlCopyPictureFormat constants.
xlBitmap
xlPicturedefault

Remarks

If you copy a range, it must be made up of adjacent cells.

Example

This example copies a screen image of cells A1:D4 on Sheet1 to the Clipboard, and then it pastes the bitmap to another location on Sheet1.

Worksheets("Sheet1").Range("A1:D4").CopyPicture xlScreen, xlBitmap
Worksheets("Sheet1").Paste _
    Destination:=Worksheets("Sheet1").Range("E6")

Applies to | Chart Object | ChartObject Object | ChartObjects Collection Object | OLEObject Object | OLEObjects Collection Object | Range Collection | Shape Object

See Also | Copy Method | Paste Method