From: pimlico on

I have tried nearly all combinations I can find of the following.
Totally stuck now. I am on excel 2K.

Set PC = ActiveWorkbook.PivotCaches.Add(xlExternal)
With PC
.LocalConnection = "OLEDB;Provider=MSOLAP;Data
Source=C:\somefilename.cub"
End With

PC.UseLocalConnection = True


It always fails on the uselocalconnection line. I get an error 1004,
app defined or object defined error.

All i want to do is open a local cub file and it doesnt seem to work.

I notice also that the
'MsgBox (ActiveWorkbook.PivotCaches.Count)

gives a value of zero even after the add.