Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am looking for VBA code that simply returns a boolean value based on
whether a pivot table exists in a worksheet. Code I have come up with is below:- Dim ws as Worksheet Dim PivotReport = PivotTable If ws.PivotTables("PivotTable3") Is Nothing = False Then 'ie the pivot table exists Set PivotReport = ws.PivotTables("PivotTable3") End If When I run this I get a "1001 object defined run time error". It appears the "Is Nothing" method is not right here. Is there an "Exists" or other like function for determining the existence of a pivot table in a Worksheet? Thanks Team |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to create pivot table from existing pivot table in excel 2007 | Excel Discussion (Misc queries) | |||
Lookup only when data exists in table | Excel Discussion (Misc queries) | |||
How can I use VBA ADO to check if a table exists in an Access DB? | Excel Programming | |||
ACCESS TABLE EXISTS-ADO | Excel Programming | |||
Help required with setting up a pivot table with the source on sheet1 to have the pivot table created on sheet called "report" | Excel Programming |