PublishObject.SourceType procedure builder

PublishObject.SourceType (Excel)

Returns an XlSourceType value that represents the type of item being published.

xlSourceAutoFilter - An AutoFilter range, xlSourceChart - A chart, xlSourcePivotTable - A PivotTable report, xlSourcePrintArea - A range of cells selected for printing, xlSourceQuery - A query table (external data range), xlSourceRange - A range of cells, xlSourceSheet - An entire worksheet, xlSourceWorkbook - A workbook.
Dim xstSourceType As XlSourceType
xstSourceType = ActiveWorkbook.PublishObjects(1).SourceType