Rx_
Nothing In Moderation
- Local time
- Today, 15:53
- Joined
- Oct 22, 2009
- Messages
- 2,795
The code accomlishes its purpose. But, the OBJXL (excel object) is orphaned and refuses to be destryoed with Set ObjXL = Nothing
Please Note Update: The problem of a ghost excel.exe remaining in task manager was identified when assigning a name to the pivot table.
Any suggestions would be welcome
Without the OBJXL qualifier in front of .Range - it is an error at runtime.
With the qualifier:
ObjXL.ActiveWorkbook.Names.Add Name:="Data1", RefersToR1C1Local:=ObjXL.Range("A5").CurrentRegion ' Set name rage Data1 to currentregion
This is set up for a PivotCaches:
ObjXL.ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"=Data1", Version:=xlPivotTableVersion14).CreatePivotTable TableDestination _
:="Sheet2!R5C1", TableName:="PivotTable1", DefaultVersion:= _
xlPivotTableVersion14
Please Note Update: The problem of a ghost excel.exe remaining in task manager was identified when assigning a name to the pivot table.
Any suggestions would be welcome
Without the OBJXL qualifier in front of .Range - it is an error at runtime.
With the qualifier:
ObjXL.ActiveWorkbook.Names.Add Name:="Data1", RefersToR1C1Local:=ObjXL.Range("A5").CurrentRegion ' Set name rage Data1 to currentregion
This is set up for a PivotCaches:
ObjXL.ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"=Data1", Version:=xlPivotTableVersion14).CreatePivotTable TableDestination _
:="Sheet2!R5C1", TableName:="PivotTable1", DefaultVersion:= _
xlPivotTableVersion14
Last edited: