Skip to Content
Mar 01, 2017 at 06:13 PM

Help with macros in SAP anaysis for MS Excel


Good day:

I'm having troubles with the macros when refreshing the workbook, in Bex we used to use the SAPBEXonRefresh sub, with this when we refresh the workbook the code will run.

Now we are migrating our Bex workbooks to Analysis for office (I'm using the version: . I've been investigating what is the sub that I need to use but I only found the Callback_AfterRedisplay sub.

I've been doing tests with some macros and the problem I'm having is because this sub runs everytime that the workbook redisplays it runs when I save it, when i made certain changes, etc.

This is an issue for us because some report users use it to make calculus with the data in the workbook and it would be uncomfortable to wait for the code to run almost everytime they make a change in the report.

Does anyone knows a way to run the code only when the data is refreshed?.

I've been investigating about this but the posts that I found don't solve this issue.

I would appreciate any help that you could give us.

Thanks in advance.