Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1.1 KB

Excel.Slicer.Copy.md

File metadata and controls

48 lines (30 loc) · 1.1 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Slicer.Copy method (Excel)
vbaxl10.chm905091
vbaxl10.chm905091
Excel.Slicer.Copy
265e7819-db8b-deab-5ab1-2cc9782cd800
05/16/2019
medium

Slicer.Copy method (Excel)

Copies the specified slicer to the clipboard.

Syntax

expression.Copy

expression A variable that represents a Slicer object.

Example

The following code example accesses the Customer slicer by using the Range property of the Shapes collection, and then copies and pastes it into the active worksheet.

ActiveSheet.Shapes.Range(Array("Customer")).Select 
Selection.Copy 
ActiveSheet.Paste 

Alternatively, you can perform the same operation by using the Slicers property of the SlicerCache object to access the slicer, as shown in the following code example.

ActiveWorkbook.SlicerCaches("Slicer_Customer") _ 
 .Slicers("Customer").Copy 
ActiveSheet.Paste

[!includeSupport and feedback]