Paste [WksRange]

Paste inserts the contents of the clipboard into the range area. Cells that lie outside the range do not paste. Returns a Boolean. The returned value is 'True', when the process is successful and 'False', when the process fails.

Syntax

object.Paste( ClipToRange)

Parameter

Type

Required/

Optional

Default

Description

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 1

This example demonstrates how to paste all clipboard contents that lie both inside and outside of a range.

WksRange.Paste(ClipToRange:=False)

Example 2

This example shows how to paste the contents of a single cell across a range of cells.

'Copies the cell B5

Wks.Range("B5").Copy()

 

'Pastes the copied value into all the cells in the new range

Wks.Range("G6:J11").Paste(True)

Used by: WksRange object