cancel
Showing results for 
Search instead for 
Did you mean: 

Bex Query with VB code

Former Member
0 Kudos

Hi,

Im trying to create a macro to find and replace cell values depending on certain conditions, I have being following this Blog (Link: [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3766] [original link is broken] [original link is broken] [original link is broken]😉 I get to the part where it describes the SAPBEXonRefresh subroutine, when I go to my editor I dont see the SAPBEX module, but I see the xBEXapi which contains the SAPBEXrefresh routine, i tried adding simple msgbox codes but it never gets executed.

What Im doing wrong? Can someone give me some guidance on how to start my macro?

Im using Excel 2003 and BW 2004s

Thanks a lot for your time.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Do you want to find and replace the cells value within sheet or From sheet1 to sheet2?

If you want to replace the cells value within a Sheet use =replace function on a required cell. It works like a refresh.

Thanks,

Ashok

Former Member
0 Kudos

Hi Ashok,

Thanks for the suggestion, the problem is that we are using a hierarchy and when the user expands nodes the data is refreshed completly and all format is lost thats why Im trying to build a macro to replace the values everytime the query is refreshed.

Former Member
0 Kudos

keep formate in work book. even query excute the formate will not distrube.

Former Member
0 Kudos

Thanks Soma, I figure it out, you need to add the macro to the Workbook properties on the Exits tab and now when the query is refreshed my macro runs with no problem.

Thank you both for your ideas and your time.

Answers (0)