Skip to Content
Former Member
Jul 27, 2007 at 05:40 AM

<VBA>To judge "Cancel" at variable selection screen in BEx analyzer


Hi BI experts,

I need some advices about how to judge whether "Cancel" button is pressed or not.

We need correction of Excel Macro for migrating reports from 3.x to 7.x.

<Summary of Macro>

1.Call variable selection screen once you pressed VBAbutton.

2.Then, depends on pressed "OK" or "Cancel", the following process wil be diverged.


&#65308;1st process's change&#65310;

Old&#65306;&#12300;Return_Code = Run("SAPBEX.XLA!SAPBEXrefresh", False, inWorksheet.Range("B30"))&#12288;&#12301;

New&#65306;&#12300;Return_Code = Run("BExAnalyzer.xla!MenuChangeVariable")&#12301;

<2nd process's change>

Under 3.x verstion, I used the situation that workbook would not be updated if you pressed "Cancel" button and write the logic.

But under 7.x verstion, even if you pressed the "Cancel" button, the workbook would be updated.

So, now I can not use the logic before and need to correct it.

Please give me some advice how to judge whether "Cancel" button is pressed or not at variable selection screen.

Also my correction of calling logic of variable selection screen?

Thanks a lot in advance!


Message was edited by:

Keiko Matsui