Skip to Content
avatar image
Former Member

Macro not executing on opening a workbook in 2004s analyser

Hello Everyone,

I have a macro called callback in my workbook and in the workbook setting under the exits tabs I have checked "Run macro on refresh " option with callback as the macro.

The macro is not being executed automatically on opening the workbook even though the workbook is being refreshed on opening the workbook. Again If i were to refresh the query after opening the workbook it gets invoked.

A couple of people seem to have same issue but no one has a clear cut solution.

Please be advised that I am using 7.0 and I am SPS15 with FEP 6 and patch 1.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 05, 2008 at 08:17 PM

    I have found a workaround --> In the standard SAP VB code for BexAnalyzer.xla in the functions in Common module I can manually insert a function call to my macro. But by doing this I would be altering the SAP program. I was wondering if anyone is stuck with same issue or if this is just an isolated case.

    If it happens for everyone I would assume this as a bug in the program and will get in touch with SAP.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Shiva,

      I am also facing the same problem. The macros don't get executed. but if you click the refresh button the macros get executed. Let me know if you find any solution. I will also update with any solution if i get

      Also can u pls give the details about your workaround so that I can also use it.


      Edited by: Sabby Chakravarty on Sep 9, 2008 4:39 PM

  • avatar image
    Former Member
    Oct 02, 2008 at 04:53 PM

    The problem is probably in the "signature" for your macro.

    SAP is expecting that the macros run directly by the refresh that code

    Your code should look like this:

    Sub <your macro> (ParamArray varname())

    This is only needed for the macro called directly by the refresh event. This is what we found will work. Hope this helps.


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Mitchell,

      This is actual code I have used :

      Sub Macrotest(ParamArray varname())
      ' Macro1 Macro
          Selection.Interior.ColorIndex = 15
          Selection.Interior.ColorIndex = 4
      End Sub

      The problem I have is that the macro is not invoked the very first time I open a workbook (I have the query refresh on wokrbook option set). Once the workbook is open changing the report or variables trigger the macro.

      Anyways I have sent an error message to SAP, will update this thread on feedback from them.