ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating local cube using PivotTable (https://www.excelbanter.com/excel-programming/344993-creating-local-cube-using-pivottable.html)

dzeaman

Creating local cube using PivotTable
 
I tried to write a macro while creating a local cube, and Excel wrote this
VB-code:
With ActiveSheet.PivotTables("Table1").PivotCache
.LocalConnection = _
"OLEDB;Provider=MSOLAP;Data Source=C:\test.cub;Initial Catalog=Test"
.UseLocalConnection = True
End With

But when I tried to execute this macro, there was an "Application defined or
object defined error". The cube was created but had no data.

First question: why?

Second question: if I will not create a microcube using this method, what
can I do to create a local cube in VBA from existing PivotTable?


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

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