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.

Hi Mitchell,
This is actual code  I have used :
Sub Macrotest(ParamArray varname())
' Macro1 Macro
    Range("H2").Select
    Selection.Interior.ColorIndex = 15
    Range("K2").Select
    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.

Similar Messages

  • Macro not executed in the background

    Hi all,
    I have created a macro to delete the forecast and it is working fine in the foreground, whenever i'm running it in the background, it is not getting executed, no forecast is getting deleted. In the job logs, it is giving the following message:
    "No data has been changed; data must not be save".
    I have tried with different logics for the macro, all are working fine in the foreground, coming to backgroung, nothing is working.
    Please help me out.
    Thank you
    Regards,
    Raj

    Hello Raj,
    For executing in background, you need to set up the 'DP Background' jobs. You must ensure that you define a proper Selection ID in Interactive Planning and assign this selection ID to the DP background job. If the proper selection data is not picked up by the Macro, then it may not execute. Hope you have followed that process of setting up Background DP jobs correctly.
    Also note that when you execute the Macro in background, if data has not been changed, you generally get a message saying 'data not saved'.

  • Not Able to Open a workbook created by a User

    Hi,
    I am facing a lot of problems when trying to open a workbook created by userA. The Situation is as follows :
    we have several workbooks which were created by a userA. This User Shared these workbooks to a responsibility. But recently this user left our company. Now we are trying to open his workbooks through the responsibility he shared but whenever i try to open it, it give me the following error :
    Missing Item or Condition
    The Main problem is, we dont even know what Business areas that workbook is using. Unfortunately there is no link between workbook and business areas from the back end (EUL Tables).
    I dont have any clue , what should i do inorder to open those workbooks.
    Any help is greatly appreciated.
    Thanks
    sandeep

    Hi
    Try this code when connected to SQL as the EUL Owner:
    SELECT
    QS.QS_DOC_OWNER USER_NAME,
    QS.QS_DOC_NAME WORKBOOK,
    QS.QS_DOC_DETAILS WORKSHEET,
    TRUNC(QS.QS_CREATED_DATE) DOC_DATE,
    (LENGTH(TO_CHAR(EUL5_GET_ITEM_NAME(QS.QS_ID)))+1)/9 ITEMS,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),1, 6)) ITEM1,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),10, 6)) ITEM2,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),19, 6)) ITEM3,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),28, 6)) ITEM4,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),37, 6)) ITEM5,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),46, 6)) ITEM6,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),55, 6)) ITEM7,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),64, 6)) ITEM8,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),73, 6)) ITEM9,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),82, 6)) ITEM10,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),91, 6)) ITEM11,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),100,6)) ITEM12,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),109,6)) ITEM13,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),118,6)) ITEM14,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),127,6)) ITEM15,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),136,6)) ITEM16,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),145,6)) ITEM17,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),154,6)) ITEM18,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),163,6)) ITEM19,
    EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),172,6)) ITEM20
    FROM
    EUL5_QPP_STATS QS--,
    -- APPS.FND_USER USR
    WHERE
    -- QS.QS_DOC_OWNER = '#' || USR.USER_ID AND
    (LENGTH(TO_CHAR(EUL5_GET_ITEM_NAME(QS.QS_ID)))+1)/9 < 21
    AND QS.QS_CREATED_DATE > '01-JAN-2008'
    AND QS.QS_DOC_NAME = workbook_name;
    You can change the CREATED_DATE to be a more recent date and then enter the name of the Workbook as the last variable.
    You will also need to have run the EUL5.SQL script, again as the EUL Owner.
    Best wishes
    Michael

  • VB Macro not executing on refresh

    Hi,
    I have followed the following steps but it is not working can you please advice:
    1.     Under VB Editor &#61664; this workbook &#61664; I added the following code:
    Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    Dim c As Range
    For Each c In resultArea.Cells
    If c.Value = "#" Then c.Value = "-"
    Next c
    End Sub
    2.     Quit the VB Editor, and save the query as a new workbook.
    On refreshing the workbook still the # sign appears in the result. If I go and check as in step 1 the routine still exist. How do I fix this issue?
    Thank you,
    sam

    siv,
    in the view code i typed exactly as you gave,
    Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    Dim ws As Worksheet
    Set ws = resultArea.Parent
    'Remove '#'
    Selection.Cells.Replace What:="#", Replacement:="", LookAt:=xlWhole, SearchOrder:=xlByRows, MatchCase:=False, MatchByte:=True
    resultArea(1, 1).Select
    End Sub
    still it is displyaing # in the result. please advice

  • Not able to open Database Engine

    Hi all,
    I am facing issue while trying to access the database engine of my SQL Server 2012 instance. It say login faile with error code "18456".
    In order to give user the login rights in to Database We must open the database engine which in my case I am not able to open the database engine. Analysis Services is opening fine.
    Can you please help me how to fix this issue so that I can open the Database Engine and view the contents of the database.
    My 'sa' account is also not enabled so that I can use the SQL authentication and then open it then give the user login right.
    Please help me with this. As I do not think installing the sql server 2012 from scratch is the solution, there must be some way.If the user has issue in accessing the Database Engine.
    Thanks for help.

    Just make sure when you are trying Olaf's link before doing anything please disable SQL Server agent other wise moment you put server is single user mode agent will make a connection and you would not be able to make connection then.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Workbook Settings - 2004s

    Hi,
    I migrated an existing 3.5 workbook to 7.0. After migration, I am facing two issues:
    1) How do I delete the data in a workbook? I don't see any option to do it.
    2) The column width is not getting expanded based on the length of the characteristic. Instead, it is occupying more cells. In 3.x there were three options for setting the column width. I don't see those anymore. I tried the 'autofit' option, but it didn't work too. What setting do I need to do inorderto make sure the cell expands as the length of the characteristic increases?

    I was able to add my code to the macro "Callback" which is already in the default template.  This worked but only on refresh, not on open.  The users would have to run the report and then hit the refresh button, not what I want.
    This is SAP's solution: "If you want a macro to run on opening of workbook (irrespective of
    refresh) you need put the macro call in workbook_open (an excel functio)That will be trigerred. They execute only on workbook open.
    I have not tried this yet, I guess it will work but my problem is: I only want this on one workbook, I think this solution will affect all workbooks.

  • How to execute a Macros automatically  when opening a workbook

    Hi people:
    I've done a macros routine in order to make some arithmetic operations. When I execute the macros manually works fine, however, when I open the workbook and put the filter values the macros isn't executed.
    Sub calculate()
    End sub
    Can anybody tell me if my code has to be in a special place or to have a special function in order to be executed any time the workbook is opened and refreshed?
    Thanks in advanced. Points for helpful answers

    Hi,
    I have done something very common. First for open the workbook:
    In the VBA Editor you have in your project in the "project window" two entries. Excel Objects and modules. In Excel Objets you have the workbook and the sheets. Got to the entry Workbook (double click) In the now opening code window you have to pulldown menus. Choose Workbook in the left one and Open in the right one. The code for the routine / handler appears automatically in the code window. Implement you code here or just call your routine.
    Changes: Do exactly the same as in the method descibed above but from the left pull down menu choose SheetChange. This method only has the Con that it will execute not only by refresh but also by every change on the sheet. If you want to have it only by refreshing then:
    SAP 3.5 - use the SAPBEXonRefresh method as described by Bob
    SAp 7.0 - int the properties window of your workbook you have a possible entry: In the register Exits you can enter your macro at "Run macro on refresh". If you set the option "Refresh Workbook on open" in the register General then you achieve what you want only by implementing the macro in "Run macro on refresh".
    regards, Lars

  • Open Specific WorkBook.v​i: subVI is not executable error

    Hi,
    I'm trying to programaticaly change some cells of a specific worksheet and then saving it on a new file.
    But I can't run the VI because I get the error Open Specific WorkBook.vi: subVI is not executable.
    I've atteched a printscreen of my VI.
    Any hints?
    Daniel Coelho
    Daniel Coelho
    VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
    Controlar - Electronica Industrial e Sistemas, Lda
    Solved!
    Go to Solution.
    Attachments:
    VI.JPG ‏16 KB

    This is the Open Specific WorkBook.vi with the error.
    Daniel Coelho
    VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
    Controlar - Electronica Industrial e Sistemas, Lda
    Attachments:
    VI2.JPG ‏140 KB

  • SSIS Script task not executing macro through SQL Agent (but it does through bids)

    <p>Hello everyone,</p><p>I am having an issue with SQL Agent when executing a macro contained in a script task component. The script task actually opens an excel file, runs the macro, save and closes the file. </p><p>When
    I execute the package via BIDS/Visual studio, it works like a charm. However, when i execute the package with SQL agent, the package runs successfully but it seems that the macro is not executed as the excel file has not been modified as it should have. Also,
    the history log does not show any error messages. </p><p>Could </p>

    Thanks!I did create a credential and a proxy too but still the macro is not executed.I have searched online for solutions but no one has experimented this kind of issue before it seems. Please have a look at the script task code:
    Imports
    Excel = Microsoft.Office.Interop.Excel
    Imports
    System
    Imports
    System.Data
    Imports
    System.Math
    Imports
    Microsoft.SqlServer.Dts.Runtime
    <System.AddIn.AddIn(
    "ScriptMain", Version:="1.0",
    Publisher:="", Description:="")>
    <System.CLSCompliantAttribute(
    False)> _
    Partial
    Public
    Class ScriptMain
    Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    Enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    End
    Enum
    Public
    Sub Main()
    Dim Macro_name
    As
    String
    Dim ExcelObject
    As
    New Microsoft.Office.Interop.Excel.Application
    Dim oBook
    As Microsoft.Office.Interop.Excel.Workbook
    Dim oBooks
    As Microsoft.Office.Interop.Excel.Workbooks
    Try
    Macro_name =
    "Macro001"
    ExcelObject =
    CType(CreateObject("Excel.Application"),
    Excel.Application)
    ExcelObject.Visible =
    True
    ExcelObject.UserControl =
    False
    ExcelObject.DisplayAlerts =
    False
    oBooks = ExcelObject.Workbooks
    oBook =
    CType(oBooks.Open("C\Book1.xls"),
    Excel.WorkbookClass)
    ExcelObject.Run(Macro_name)
    Catch ex
    As Exception
    ExcelObject.Application.Quit()
    ExcelObject.DisplayAlerts =
    True
    ExcelObject =
    Nothing
    End
    Try
    Dts.TaskResult = ScriptResults.Success
    End
    Sub
    End
    Class

  • Newly added discoverer responsibility does not open the workbook sheets

    Adding reports to newly added discoverer responsibility does not open the workbook sheets
    Actually its a new responsibility where i add existing workbook, also shared the business area but when trying to execute the report through my user firstly it says "Workbbok cannot be expanded, Unable to open workbook" later when i close the page i get the below error
    “Contact with the Discover server has been lost. To continue with your work, please restart Discoverer Plus. If this problem persists, please contact your Oracle Application Server Administrator” error message.
    Please suggest.

    Hi,
    You need to run a trace for this user to diagnose this issue. Look at note 133055.1 for more details.
    Rod West

  • Macro not refreshing in workbook with SP 14

    Hi Gurus,
    We have developed worbooks which uses macros to transform data from query to the report sheet. After installing SP front end 14, the macro's are not getting refreshed when the workbook opens., This was fine untill SP 13. Pl let me know if anyone is encountering this issue.
    Just a note my macro code gets called from CallBack subroutine.
    Thanks

    Hi Syed,
    I got the same problem with Frontend Patch 15 here. It allready worked with FEP14. The macro I defined in the workbook properties is not used when you initially open a query. When you do a refresh manually everything works fine.
    Could you solve this problem? If so please let me know how...
    Regards,
    Joerg

  • ICal failing to run applescripts: The 'Open' button does not change to 'Run', and the script file is opened but not executed on alert.

    iCal failing to run applescripts: The 'Open' button does not change to 'Run', and the script file is opened but not executed.

    Calendar (not called iCal anymore) does not include that capability any longer, apparently.  What you have to do now is go to Automator and create a Calendar Alert action.  You can add a Run AppleScript object to the action and paste in your script there, then when you save it, it will become available as a choice in the alert menu in Calendar.

  • Cannot run the macro 'YIELD'. The macro may not be available in this workbook or all macros may be disabled.

    Dear Sir,
              While i am calling Excel function through asp.net  using Excel 2003 i  was not facing any kind of issue it's working fine but while i am calling  Excel functions through asp.net using 
    Excel 2010  i am facing an issue even after enabling the micro in settings . issue is 
    "Cannot run the macro 'YIELD'. The macro may not be available in this workbook or all macros may be disabled." please solve this as soon as possible .
    Thanks & Regards
      Sanjeev

    // I made a singleton class and calling that class to access Excel functions
    Public Class Singleton
        Private Shared objexcel As Excel.Application
        Private Shared lock As New Object
        Private Sub New()
            System.Console.WriteLine("Instance of Singleton class created at : " & Now())
        End Sub
        Public Shared Function GetInstance() As Excel.Application
            SyncLock lock
                If objexcel Is Nothing Then
                    objexcel = New Excel.Application
                    objexcel.RegisterXLL(objexcel.LibraryPath & "\Analysis\ANALYS32.XLL")
                End If
                Return objexcel
            End SyncLock
        End Function
    End Class
    // Common Function for yield 
    Public Sub CalculateYield( _
               ByVal YTMDate As Date, ByVal FaceValue As Double, ByVal Rate As Double, _
               ByVal NonGovernmentFlag As Boolean, ByVal RateActualFlag As Boolean, _
               ByVal MaturityDate As Date, ByVal MaturityAmt As Double, _
               ByVal CouponDate As Date, ByVal CouponRate As Double, _
               ByVal CallDate As Date, ByVal CallAmt As Double, _
               ByVal PutDate As Date, ByVal PutAmt As Double, ByVal intFrequency As Int16, _
               ByVal strOption As String, ByVal dblResult As Double, ByVal strSemiAnnFlag As String)
            Try
                Dim decMarketValue As Double
                Dim intBasis As Int16
                decMarketValue = IIf(RateActualFlag = True, Rate * FaceValue / 100, Rate)
                decMarketValue = decMarketValue * 100 / FaceValue
                decMarketValue = objCommon.DecimalFormat(decMarketValue)
                MaturityAmt = MaturityAmt * 100 / FaceValue
                MaturityAmt = objCommon.DecimalFormat(MaturityAmt)
                CallAmt = CallAmt * 100 / FaceValue
                CallAmt = objCommon.DecimalFormat(CallAmt)
                PutAmt = PutAmt * 100 / FaceValue
                PutAmt = objCommon.DecimalFormat(PutAmt)
                intBasis = IIf(NonGovernmentFlag = True, 3, 4)
                If strOption = "Y" Then
                    With Singleton.GetInstance
                        If MaturityDate <> Date.MinValue And MaturityDate > YTMDate Then
                            dblYield = CType(Singleton.GetInstance.Run("YIELD", YTMDate, MaturityDate, CouponRate / 100, decMarketValue, MaturityAmt,
    intFrequency, intBasis), Double)
                            dblYTMAnn = CType(Singleton.GetInstance.Run("EFFECT", dblYield, intFrequency), Double)
                            dblYTMSemi = CType(Singleton.GetInstance.Run("NOMINAL", dblYTMAnn, 2), Double)
                            'End If
                            dblYTMAnn = dblYTMAnn * 100
                            dblYTMSemi = dblYTMSemi * 100
                        Else
                            dblYTMAnn = 0
                            dblYTMSemi = 0
                        End If
                        If CallDate <> Date.MinValue And CallDate > YTMDate Then
                            dblYield = CType(Singleton.GetInstance.Run("YIELD", YTMDate, MaturityDate, CouponRate / 100, decMarketValue, MaturityAmt,
    intFrequency, intBasis), Double)
                            dblYTCAnn = CType(Singleton.GetInstance.Run("EFFECT", dblYield, intFrequency), Double)
                            dblYTCSemi = CType(Singleton.GetInstance.Run("NOMINAL", dblYTMAnn, 2), Double)
                            'End If
                            dblYTCAnn = dblYTCAnn * 100
                            dblYTCSemi = dblYTCSemi * 100
                        Else
                            dblYTCAnn = 0
                            dblYTCSemi = 0
                        End If
                        If PutDate <> Date.MinValue And PutDate > YTMDate Then
                            dblYield = CType(Singleton.GetInstance.Run("YIELD", YTMDate, MaturityDate, CouponRate / 100, decMarketValue, MaturityAmt,
    intFrequency, intBasis), Double)
                            dblYTPAnn = CType(Singleton.GetInstance.Run("EFFECT", dblYield, intFrequency), Double)
                            dblYTPSemi = CType(Singleton.GetInstance.Run("NOMINAL", dblYTMAnn, 2), Double)
                            dblYTPAnn = dblYTPAnn * 100
                            dblYTPSemi = dblYTPSemi * 100
                        Else
                            dblYTPAnn = 0
                            dblYTPSemi = 0
                        End If
                    End With
                End If
            Catch ex As Exception
                Throw ex
            End Try
        End Sub
    // call  yield function
    GlobalFuns.CalculateYield(datYTM, decFaceValue, decRate, blnNonGovernment, blnRateActual, datMaturity, decMaturityAmt, _
                                   datCoupon, decCouponRate, datCall, decCallAmt, datPut, decPutAmt, Val(Hid_Frequency.Value
    & ""), "Y", 0, "")
    this code  is working in Excel 2003 but it's not working in Excel 2010
    //Error is
    Cannot run the macro 'YIELD'. The macro may not be available in this workbook or all macros may be disabled.

  • Analyzer 7.0: Excel add-ins not loaded on opening workbook

    Hi all,
    we are having a problem with some of our workbooks which are using additional functions from a standard microsoft add-in (Analysis Toolpak - function "mduration" for exmaple).
    The add-in is checked as "load" under Extras->Add-Ins.
    Opening the workbook without analyzer is just fine.
    When opening BEx Analyzer 7.0 and then the Excel workbook, all functions from the add-in (such as "mduration") only return #NAME, as if the add-in is not loaded properly.
    Using BEx Analyzer 3.5 this DOES work, however.
    We are on SAP GUI 7.10 PL11 with BI 7.0 Add-On SP10. Excel version is 2003.
    Does anyone kow whether this is a known problem or if a solution exists (maybe with latest BI Add-On SP)?
    Thanks,
    Hendrik
    Edited by: HMaeder on Jan 21, 2010 9:57 AM

    Hi
    Go through this blog
    /people/john.appleby3/blog/2009/11/09/sap-netweaver-bw-70-excel-workbook-precalculation-or-scheduling
    and also do the global settings
    http://help.sap.com/saphelp_nw70/helpdata/en/f1/0a551ce09411d2acb90000e829fbfe/content.htm
    santosh

  • Tcode opens selection screen, but does not executes the program

    Hi!
    tcode opens selection screen of a custom program, but it seems that it does not executes the program itself.
    Sounds strange, but how to explain this if I can run a program manually with no problem and it displays result screen, but when I try to run the program with tcode - it opens selection screen but program quits before displaying result screen. I was putting a breakpoint at the begining of the program - it does not triggers debuger when running a tcode (it triggers debugger if to run program manually).... any ideas?
    Help will be appreciated,
    Mindaugas

    Are you using this???
          SET PARAMETER ID '80B' FIELD T_TABLE-OPBEL.
          CALL TRANSACTION 'FPE3' AND SKIP FIRST SCREEN.
    That way it should work....
    Greetings,
    Blag.

Maybe you are looking for

  • Report for loans given to customer

    hi to all,            i m new to abap, i have requirement for developing a report that list loans given to customer.im unable to find table for loans please help me out .its very very urgent.

  • How do I delete an app store app from my computer?

    I downloaded a useless app from the app store and I want to delete from my computer. Is there a way to do this? Thanks, Lou

  • Body and Signature not getting in reciever mail adapter

    Hi Friends, My requirement is the reciever mail adapter having the Attachment and Body and signature. Here i am getting Attachment only. I am not getting Body( example: the ftp successfully genrated this file abbc_12/03/2014.txt) and Signature. Signa

  • How to get content item out of work flow automatically

    hi experts, my requirement is that Contributor will contribute the Content , and provide the content publish Date. When contributor contribute content, content goes in workflow. I want auto approval of workflow so that when Publish Date actually come

  • Font not displaying

    Hi I am developing a website where my customer wants to use the Lucida Handwriting font, I have selected this font in the font list but it does not show in designer, live view or in the browser. Is this due to the fact that its not a font that browse