Name

Application.ClipboardFormats

Synopsis

Returns an array of XlClipboardFormat constants indicating the types of data currently on the clipboard. Possible array values are:

xlClipboardFormatBIFF

xlClipboardFormatBIFF2

xlClipboardFormatBIFF3

xlClipboardFormatBIFF4

xlClipboardFormatBinary

xlClipboardFormatBitmap

xlClipboardFormatCGM

xlClipboardFormatCSV

xlClipboardFormatDIF

xlClipboardFormatDspText

xlClipboardFormatEmbeddedObject

xlClipboardFormatEmbedSource

xlClipboardFormatLink

xlClipboardFormatLinkSource

xlClipboardFormatLinkSourceDesc

xlClipboardFormatMovie

xlClipboardFormatNative

xlClipboardFormatObjectDesc

xlClipboardFormatObjectLink

xlClipboardFormatOwnerLink

xlClipboardFormatPICT

xlClipboardFormatPrintPICT

xlClipboardFormatRTF

xlClipboardFormatScreenPICT

xlClipboardFormatStandardFont

xlClipboardFormatStandardScale

xlClipboardFormatSYLK

xlClipboardFormatTable

xlClipboardFormatText

xlClipboardFormatToolFace

xlClipboardFormatToolFacePICT

xlClipboardFormatVALU

xlClipboardFormatWK1

 

Use ClipboardFormats to determine the type of data available on the clipboard before taking other actions, such as Paste. For example, this code copies a chart into the clipboard, then pastes it into Paint:

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)   Sub TestClipBoardFormats( ) Dim fmt, chrt As Chart ' Copy a chart image into the clipboard. Set chrt = Charts(1) chrt.CopyPicture xlScreen, ...

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.