ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   problems with a localconnection to a cub file (https://www.excelbanter.com/excel-programming/381432-problems-localconnection-cub-file.html)

pimlico

problems with a localconnection to a cub file
 

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.



All times are GMT +1. The time now is 07:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com