Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I have a simple workbook with two worksheets that I named in the IDE as wksImportedData and wksPivot, which hold an external data QueryTable and a Pivot Table respectively. I wrote a procedure to make it easy for my client to "reset" the pivot table to its default configuration, in case they get carried away dragging fields all over creation (and who doesn't, with pivot tables?). The problem is that my object variable doesn't seem to get assigned to the pivot table like it should. Here is the code: dim pvtFinancials as Excel.PivotTable set pvtFinancials = wksPivot.PivotTables("pvtAcctFinancials") When I use pvtFinancials in the code, however, I get a 1004 error. As a sanity check, I typed the following into the Immediate Window: ?wksPivot.PivotTables.Count and got a 1. Encouraged, I typed: ?wksPivot.PivotTables(1).Name and got a 1004 error. Does anyone have any ideas as to what might be going on? All help and advice are greatly appreciated, - jeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Entering Variable in a Pivot Table | Excel Discussion (Misc queries) | |||
variable last cell in pivot table macro | Excel Programming | |||
Pivot Table variable range | Excel Programming | |||
Im so close. Need variable range for the pivot table | Excel Programming | |||
Pivot Table - Object variable or with block variable not set? | Excel Programming |