Range.PasteSpecial Method
Pastes a Range from the Clipboard into the specified range.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function PasteSpecial ( _
Paste As XlPasteType, _
Operation As XlPasteSpecialOperation, _
SkipBlanks As Object, _
Transpose As Object _
) As Object
'Usage
Dim instance As Range
Dim Paste As XlPasteType
Dim Operation As XlPasteSpecialOperation
Dim SkipBlanks As Object
Dim Transpose As Object
Dim returnValue As Object
returnValue = instance.PasteSpecial(Paste, _
Operation, SkipBlanks, Transpose)
Object PasteSpecial(
XlPasteType Paste,
XlPasteSpecialOperation Operation,
Object SkipBlanks,
Object Transpose
)
Parameters
Paste
Type: Microsoft.Office.Interop.Excel.XlPasteTypeOptional XlPasteType. The part of the range to be pasted. Can be one of the following XlPasteType constants:
xlPasteAll default
xlPasteAllExceptBorders
xlPasteColumnWidths
xlPasteComments
xlPasteFormats
xlPasteFormulas
xlPasteFormulasAndNumberFormats
xlPasteValidation
xlPasteValues
xlPasteValuesAndNumberFormats
Operation
Type: Microsoft.Office.Interop.Excel.XlPasteSpecialOperationOptional XlPasteSpecialOperation. The paste operation. Can be one of the following XlPasteSpecialOperation constants:
xlPasteSpecialOperationAdd
xlPasteSpecialOperationDivide
xlPasteSpecialOperationMultiply
xlPasteSpecialOperationNonedefault
xlPasteSpecialOperationSubtract
SkipBlanks
Type: System.ObjectOptional Object. True to not have blank cells in the range on the Clipboard pasted into the destination range. The default value is False.
Transpose
Type: System.ObjectOptional Object. True to transpose rows and columns when the range is pasted. The default value is False.
Return Value
Type: System.Object