SlicerCache.WorkbookConnection Property (Excel)
Gets or sets the WorkbookConnection object that represents the data connection used by the specified slicer. Read/Write.
expression A variable that represents a 'SlicerCache' object.
The WorkbookConnection property only applies to slicers that are based on external data sources (SlicerCache . SourceType = xlExternal). Attempting to access the WorkbookConnection property for slicers that are connected to PivotTables based on workbook ranges or lists (SlicerCache . SourceType = xlDatabase) generates a run-time error.
The workbook connection value must be unique. Setting the workbook connection to a value that already exists generates a run-time error.