Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd use something like:
Dim PT as pivottable set pt = nothing on error resume next set pt = worksheets("Pivot").PivotTables("MyPivot") on error goto 0 if pt is nothing then 'nope else 'yep end if Paolo Sardi wrote: Hi, I'm trying to check if a pivot table named "MyPivot" exists in a given worksheet. I tried with: If worksheets("Pivot").PivotTables("MyPivot") is nothing then... Unfortunately Excel gives me an error, I think because it does not find the PivotTables("MyPivot"). Is there a way to check if a PivotTable exists? Thank you. -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range existence check | Excel Programming | |||
Check for existence | Excel Discussion (Misc queries) | |||
VBA to check for existence of a DSN | Excel Programming | |||
How do I check for existence of a worksheet? | Excel Worksheet Functions | |||
Code to check existence | Excel Programming |