O'Reilly logo

Programming Excel with VBA and .NET by Steve Saunders, Jeff Webb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required