cancel
Showing results for 
Search instead for 
Did you mean: 

Standard Analysis button in custom ribbon

former_member753187
Discoverer
0 Kudos

Hello everybody,

I´m developing a custom ribbon in Analysis for Office (Excel 2010) and would like to use some of the standard Analysis Buttons.

Some functions like "save plan data" or "refresh" are available via "SAPExecuteCommand" through a macro call.

But let´s say I want to add a "Swap Axis" button or a "Lock Cells" button, then I see no way to implementing these buttons in my custom ribbon yet.

Did somebody encounter similar issues or did someone find a solution?

Thank you!

Robert

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Robert,

I would say that both your requests of a "Swap Axis" button or a "Lock Cells" button should be possible. ... as long you can execute this via VBA it should work.

For "Swap Axis" you can use this (example from Help document):

Dim lResult As Long

lResult= Application.Run("SAPMoveDimension", "DS_1", "0COUNTRY", "NACH", "0CALMONTH" )

Might be a bit tricky to identify the dimensions in the rows and columns first, but once you have that it should work to swap them via VBA.

The "Lock Cells" could also work... I would try to record a macro first while executing the locking manually... afterwards just edit the macro.

Here is some more detail about Ribbon customization:

Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)

Best regards,

Martin

former_member753187
Discoverer
0 Kudos

Hi Martin,

thanks for your input!

Yes, the SAPMoveDimension command does the job, it's just rather complicated compared to the out-of-the-box feature anaylsis has on board.

Unfortunately, recording a macro does not catch the analysis button clicks.

I was hoping for a undocumented API or a possibility to call these analysis functions directly. Something like this:

But this also does not cover my requirements, since the needed functionality is not available.

I'll let you know if I find some news.

Kind regards,

Robert