Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SG SG is offline
external usenet poster
 
Posts: 4
Default CreateCubeFile Method - RARELY Used - Need urgent help

Hi,

Please see if anyone can help me with this -

I have written to the following VBA code in excel to automate the
process of Offline Cubes creation :-

Sub UseCreateCubeFile()

Sheets("Sheet2").PivotTables("PivotTable1").Create CubeFile _
File:="C:\Documents and Settings\shegupta\Desktop\Sales.cub",
Measures:=Array("[Sales]"), Levels:=Array("[Product].[Company Name]"),
Properties:=False

End Sub

I am getting the error "Invalid Procedure call or argument".
I have checked extensively the HELP available on MSDN / excel help
files / and searched a lot on net, but not able to find any Example
which uses the complete syntax of CreateCubeFile method.

Please help if anyone has used this before. It would be gr8 if anyone
can tell me just the complete syntax of this method that he/she may
have used somewhere.

Thanks
SG

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default CreateCubeFile Method - RARELY Used - Need urgent help

Ok,

* is the sheet name correct?
* is the pivot table called PivotTable1

next,

* Does the path where that cub file will be written by the CreateCubeFile
method of the pivottable exist on the workstation? Can you see it that path
Windows Explorer (C:\Documents and Settings\shegupta\Desktop\) ?
* Does the Pivot Table include information Sales, Product, Company Name ?

I hope that helps...

Philip


"SG" wrote:

Hi,

Please see if anyone can help me with this -

I have written to the following VBA code in excel to automate the
process of Offline Cubes creation :-

Sub UseCreateCubeFile()

Sheets("Sheet2").PivotTables("PivotTable1").Create CubeFile _
File:="C:\Documents and Settings\shegupta\Desktop\Sales.cub",
Measures:=Array("[Sales]"), Levels:=Array("[Product].[Company Name]"),
Properties:=False

End Sub

I am getting the error "Invalid Procedure call or argument".
I have checked extensively the HELP available on MSDN / excel help
files / and searched a lot on net, but not able to find any Example
which uses the complete syntax of CreateCubeFile method.

Please help if anyone has used this before. It would be gr8 if anyone
can tell me just the complete syntax of this method that he/she may
have used somewhere.

Thanks
SG


  #3   Report Post  
Posted to microsoft.public.excel.programming
SG SG is offline
external usenet poster
 
Posts: 4
Default CreateCubeFile Method - RARELY Used - Need urgent help

Yes Philip, I have checked everthing. It's fine, but the code is still
not working.

Its only that I am NOT sure about the syntax that I have used for the
method. And I am not able to find any real example for the same which
uses all the arguments i.e., Measures, Levels and Members for this
method. The excel help file only gives an example with all the
arguments omitted. The excel help file mentions only the following
example:-

Sub UseCreateCubeFile()

ActiveSheet.PivotTables(1).CreateCubeFile _
File:="C:\CustomCubeFile", Properties:=False

End Sub


Now the problem is that after lots of searching on net and all the
places I can think of, I am not able to find an example of this method
which uses all the arguments.

1 more doubt I would like to add, is it necessary that the PivotTable
fieldlist is included in the PivotTable for ceating the offline cube
through the code ? Can't the cube pick all the Dimensions and facts
directly from the Pivottable fieldlist instead of the fields being
selected in the PivotTable report.

Thanks
SG

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
Please post this thread a correct full method, method about Nast Runsome New Users to Excel 8 February 25th 08 03:29 PM
Please post this thread a complete correct method, method about te Nast Runsome New Users to Excel 0 February 23rd 08 09:42 PM
Hidden rarely used menu items Jack Sheet New Users to Excel 2 August 13th 06 09:58 AM
Sub Total Method URGENT jacqui[_2_] Excel Programming 1 February 20th 04 02:50 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"