Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
On Excel 2003 SP2: I'm trying to create a pivot table with a pivot cache connected to a local cube file as follows: Sub Macro1() With ActiveWorkbook.PivotCaches.Add(SourceType:=xlExter nal) .LocalConnection = "OLEDB;Provider=MSOLAP;Data Source=C:\Documents and Settings\nir.zamir\Desktop\Basic Metrics.cub" .UseLocalConnection = True .CommandType = xlCmdCube .CommandText = Array("AdvertisingDataMain") .MaintainConnection = True .CreatePivotTable TableDestination:="[Book1]Sheet1!R3C1", TableName:= _ "PivotTable1", DefaultVersion:=xlPivotTableVersion10 End With End Sub However, the UseLocalConnection line throws an error (run time error 1004 - application-defined or object-defined error). What could be the reason? Thanks, Nir |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Affect a new connection to a pivot table | Excel Discussion (Misc queries) | |||
Excel 2007 - Local Cube - Pivot Table | Excel Discussion (Misc queries) | |||
I would lke to create a league table for my local dart team | Excel Discussion (Misc queries) | |||
Copy pivot table and get rid of connection | Excel Discussion (Misc queries) | |||
Pivot Table Connection | Excel Programming |