Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I recorded a macro that created two pivot tables from an external DB. The
first time it runs in "Book1" ok. The second time the statement below causes a run time error. I have to close and re-open excel to make it run all the way through on another database. What can I do to make it run in "Book2" etc. without having to close and re-open excel. '******* Run time error 1004 unable to get the Pivot Tables property of the worksheet class ActiveSheet.PivotTables("PivotTable2").AddFields RowFields:="dosmoyr", _ ColumnFields:="transmoyr", PageFields:="facilityid" Pete Straman -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Closing and reopening the same file | Excel Discussion (Misc queries) | |||
real estate closing statement | Excel Discussion (Misc queries) | |||
Can I stop Excel from reopening personal.xl when I run a macro? | Excel Discussion (Misc queries) | |||
closing 1 file at a time | Excel Discussion (Misc queries) | |||
My comments reformat after closing and reopening. | Excel Discussion (Misc queries) |