PasteSpecial Method (Worksheet Object)

See Also         Example         Applies To

Pastes the contents of the Clipboard onto the sheet, using a specified format. Use this method to paste data from other applications or to paste data in a specific format.

Syntax

expression.PasteSpecial(Format, Link, DisplayAsIcon, IconFileName, IconIndex, IconLabel)

expression   Required. An expression that returns a DialogSheet or Worksheet object.

Format   Optional Variant. A string that specifies the Clipboard format of the data.

Link   Optional Variant. True to establish a link to the source of the pasted data. If the source data isn’t suitable for linking or the source application doesn't support linking, this parameter is ignored. The default value is False.

DisplayAsIcon   Optional Variant. True to display the pasted as an icon. The default value is False.

IconFileName   Optional Variant. The name of the file that contains the icon to use if DisplayAsIcon is True.

IconIndex   Optional Variant. The index number of the icon within the icon file.

IconLabel   Optional Variant. The text label of the icon.

Remarks

You must select the destination range before you use this method.

This method may modify the sheet selection, depending on the contents of the Clipboard.