how can I check in VB if a sheet is having a pivot table?

W

WJvR

I want to select a pivot table on an active sheet in an Excel Workbook, if
there is a pivot table in that active sheet.

How can I do that?

Thanks for helping

WJvR
 
J

JE McGimpsey

One way:

If ActiveSheet.PivotTables.Count > 0 Then
'Do Something
Else
'Do Something Else
End If
 
W

WJvR

that helps for sure, thanks!

but now is still my problem, how do I know, where the pivot table starts in
the sheet. Does anyone know how to go to the first cell in the pivottable?

WJvR
 
B

Bob Greenblatt

that helps for sure, thanks!

but now is still my problem, how do I know, where the pivot table starts in
the sheet. Does anyone know how to go to the first cell in the pivottable?

WJvR
How about
....pivottable.tablerange1.cells(1).address
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top