Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8704

Re: lresult yield to Type mismatch

$
0
0

Hello,

 

your input parameters for the function call are wrong. SapGetCellInfo expects a Cell or Range of Cells as first input parameter. In your example the input parameter is  a plain string. Please refer to the "working with macros" chapter of the Analysis for Office help. (Press F1 after switching to the Analysis for Office Addin Ribbon in Excel)

 

Following your example:

lresult = Application.run("SapGetCellInfo", Names("SapCrosstab8").RefersToRange, "DATASOURCE")

should give you the result you seem to be looking for.

 

If you are working with this, take care not to forget to add "Sap" in front of the Crosstabs Formula Alias. Analysis creates a named element in your workbook for every Crosstab that way which refers to the range used by that crosstab.

 

Please be aware that doing this with a Crosstab Formula Alias / Excel Named Range, that does not exist in your workbook, will result in a dump too. To prevent that you would have to implement some kind of error handling.

 

 

Kind regards,


Viewing all articles
Browse latest Browse all 8704

Trending Articles