ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cubevalue (Excel 2007) versus Cubecellvalue (Excel 2003) (https://www.excelbanter.com/excel-programming/409972-cubevalue-excel-2007-versus-cubecellvalue-excel-2003-a.html)

Quiller38

Cubevalue (Excel 2007) versus Cubecellvalue (Excel 2003)
 
I have developed a spreadsheet in Excel 2003 which attaches to an analysis
services cube, using the analysis services add-in function "cubecellvalue"
plus appropriate mdx statements to build the sheet in the format required.

However in Excel 2007 this only works if I alter the sheet to use the
built-in function "cubevalue", which then does not work in Excel 2003.

My problem is that I have users who need to share spreadsheets, and they are
using a mixture of versions. Do you think it is possible for me to create
and distribute a function of my own called "cubevalue" in Excel 2003 which
would then make the sheets compatible with Excel 2007 ? Or does Microsoft
have a compatibility aid that I am not aware of which would avoid this
problem ?

Mike Fogleman[_2_]

Cubevalue (Excel 2007) versus Cubecellvalue (Excel 2003)
 
Perhaps check the version number of Excel to set-up the sheet and run the
appropriate code with logic like this:

If Excel.Version 12 Then
alter sheet to run built-in cube
Else
run add-in cube
End If

Mike F
"Quiller38" wrote in message
...
I have developed a spreadsheet in Excel 2003 which attaches to an analysis
services cube, using the analysis services add-in function "cubecellvalue"
plus appropriate mdx statements to build the sheet in the format required.

However in Excel 2007 this only works if I alter the sheet to use the
built-in function "cubevalue", which then does not work in Excel 2003.

My problem is that I have users who need to share spreadsheets, and they
are
using a mixture of versions. Do you think it is possible for me to create
and distribute a function of my own called "cubevalue" in Excel 2003 which
would then make the sheets compatible with Excel 2007 ? Or does Microsoft
have a compatibility aid that I am not aware of which would avoid this
problem ?




Peter T

Cubevalue (Excel 2007) versus Cubecellvalue (Excel 2003)
 
Suggest change

If Excel.Version 12 Then


to

If Val(Application.Version) = 12 Then

Regards,
Peter T

"Mike Fogleman" wrote in message
. ..
Perhaps check the version number of Excel to set-up the sheet and run the
appropriate code with logic like this:

If Excel.Version 12 Then
alter sheet to run built-in cube
Else
run add-in cube
End If

Mike F
"Quiller38" wrote in message
...
I have developed a spreadsheet in Excel 2003 which attaches to an

analysis
services cube, using the analysis services add-in function

"cubecellvalue"
plus appropriate mdx statements to build the sheet in the format

required.

However in Excel 2007 this only works if I alter the sheet to use the
built-in function "cubevalue", which then does not work in Excel 2003.

My problem is that I have users who need to share spreadsheets, and they
are
using a mixture of versions. Do you think it is possible for me to

create
and distribute a function of my own called "cubevalue" in Excel 2003

which
would then make the sheets compatible with Excel 2007 ? Or does

Microsoft
have a compatibility aid that I am not aware of which would avoid this
problem ?






Quiller38

Cubevalue (Excel 2007) versus Cubecellvalue (Excel 2003)
 
Okay thanks chaps, I will go down the route of testing for version and then
use a macro to change the formulas depending on which version it is in.



All times are GMT +1. The time now is 11:58 PM.

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