PasteSpecial
PasteSpecial inserts clipboard contents using the specified format into the range area. This method will not paste into cells that lie outside the range. Returns a Boolean. The returned value is 'True', when the process is successful and 'False', when the process fails.
Syntax
object.PasteSpecial( Format, ClipToRange )
Parameter |
Type |
Required/ Optional |
Default |
Description |
Format |
Required |
This specifies the clipboard formats displayed, which may vary depending on where the information was copied from. |
||
ClipToRange |
Boolean |
Optional |
True |
This specifies whether the cells lying outside the range should be pasted or not. By default it does not paste cells outside the range. |
Example
This example demonstrates how to paste clipboard contents as text only with a range.
WksRange.PasteSpecial(Format:=wksClipboardText, ClipToRange:=True)
Used by: WksRange object