Name
worksheet
.PasteSpecial([Format
], [Link
], [DisplayAsIcon
], [IconFileName
], [IconIndex
], [IconLabel
], [NoHTMLFormatting
])
Synopsis
Pastes the contents of the clipboard, including formatting, onto the specified worksheet.
Argument |
Settings |
---|---|
|
The format of the clipboard contents to paste, using one of the strings specified in the As list box of the Paste Special dialog box |
|
True to establish a link between the pasted clipboard contents and their source |
|
True to display the pasted clipboard contents as an icon |
|
The name of the file containing the icon to display |
|
The numeric index of the icon within the icon file |
|
The label to display with the icon |
|
True to remove all HTML formatting from the clipboard contents |
The following code pastes the contents of the clipboard into cell D2 as a hyperlink:
Worksheets("WombatBattingAverages ").Range("D2").Select ActiveSheet.PasteSpecial Format:= "Hyperlink"
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.