Multible Returns in a Macro

Hi,
I´m dealing with some stereoscopic footage, and I´m trying to create some macros for stereoscopic compositing. The functionality is done, but I can´t figure out, how to make a macro with two outputs (left and right image). Shake only allows one return statement, and in fact i´ve never seen a macro with two output´s. Is anyone out there so hacky to help me?
cu
and
thanx

Yes, I had tried that before too... but I was getting a
Runtime Error '1004'  Application-defined or Object-defined error
Well, similar, because when I looked at your code, I saw that I was not closing my parenthesis... oops
Now the code runs, but it is still not transferring the formula to my new sheet. 
Anyways I have found my problem.
 I have a line in my code that does a  PasteSpecial Paste, and this is what is erasing my formula in excel. 
I have modified that line, now my formula is transferring fine to my new sheet. 
Nevertheless, I still don’t understand why the formula in code does not transfer… but well guess what I needed is working now.
Thank you very much for your help
Albert

Similar Messages

  • Dynamic logic expression

    Hi Experts, 
    Iu2019m trying to build a routine with dynamic logical expressions but it's now working...
    Basically Iu2019m building a string with the expression, a and after the string it's completed Iu2019m calling a macro that consist in a if.
    if expression eq true
    return true value
    but the value returned by the macro it's always false, even when the logical expression it's true...
    i already tried the logical function BOOLC but apparently my version, ECC 6, doesnu2019t recognize it....
    Below goes the code, if anyone could help me Iu2019ll be appreciated.
    "Macro definition
    DEFINE check_condition.
    IF &1 EQ ABAP_TRUE.
        move 'X' to &2.
      endif.
    END-OF-DEFINITION.
    LOOP AT tab_regras."Rules
        CLEAR: str_cond, lv_result.
        LOOP AT dfies_tab WHERE fieldname CS 'ARGUMENTO'.
          CLEAR: lw_string, str_1, str_2, str_3.
          ASSIGN COMPONENT dfies_tab-fieldname OF STRUCTURE tab_regras TO <fs_field>.
          CHECK <fs_field> IS NOT INITIAL.
          SPLIT <fs_field> AT '/' INTO  str_1 str_2 str_3.
          ASSIGN (str_1) TO <fs_value1>.
    "     ASSIGN (str_2) TO <fs_value2>.
    "      ASSIGN (str_3) TO <fs_value3>.
          IF str_cond IS INITIAL..
            CONCATENATE <fs_value1> str_2 str_3 INTO str_cond SEPARATED BY space.
            CONTINUE.
          ENDIF.
          CONCATENATE str_cond 'and' <fs_value1> str_2 str_3 INTO str_cond SEPARATED BY space."string condition
        ENDLOOP.
        check_condition str_cond lv_result.
        CHECK lv_result EQ 'X'.
    Thanks in advance,
    Best Regards
    João Martins

    It would be helpful if you show us what is the example content of str_cond .
    Anyhow your check looks like you want to compare some condition with value X which abap_true denotes i.e.
    if field_1 = 10 and field_2 = 20 EQ 'X'. 
    endif.
    This doesn't make sense for me or maybe I am missing something which is hidden behid this str_cond . Your left hand side expression value must however be equal to right hand side value. So the conditon will only be true if
    if 'X' = 'X'.
    endif.
    Regards
    Marcin
    PS: please note that in ABAP there is no real boolean value, so you can't have condition like in JAVA or C
    if (true_condition)
    //do something
    you always have to compare two values (here abap_true which is X if fact).
    Edited by: Marcin Pciak on May 24, 2011 3:59 PM

  • Using a Macro to add a Carriage Return after each data entry within all cells of an imported range of cells

    I have a macro that copies data from a Target workbook then pastes the data into a destination workbook.  I then wish to use lookups in the destination workbook to view specific data from the pasted range of data on a separate sheet. 
    The problem is, the cells that contain numbers from the pasted data have the green dogeared error flags associated with the cell. The only way I can make a lookup function work, is to go to each cell and manually enter a carriage return after each entry. 
    The code for the macro is given below.  What can be done so that the pasted data contains no errors associated with the number cells?  Or can a second macro be written to clean the data.  If so can you help me out?  Thanks in advance.
    Kindest Regards
    Sub ImportData()
     ' ImportData Macro allows user to select an Excel workbook (i.e. Orchestrate Excel Output),
     ' then copy & paste it into the MediaSpreadsheet.
        Dim wbk As Workbook
        Set wbk = Application.Run("MediaSpreadsheet_1.0.xlsm!OpenFile")
        If wbk Is Nothing Then
            Beep
            Exit Sub
        End If
        Set wbk = ActiveWorkbook
        Range("A9:S116").Copy
        Workbooks("MediaSpreadsheet_1.0.xlsm").Activate
        Sheets("OrchestrateData").Select
        Range("A1").Select
        ActiveSheet.Paste
        With Selection.Font
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
        End With
        With Selection.Interior
            .Pattern = xlNone
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
        Selection.Borders(xlDiagonalDown).LineStyle = xlNone
        Selection.Borders(xlDiagonalUp).LineStyle = xlNone
        Selection.Borders(xlEdgeLeft).LineStyle = xlNone
        Selection.Borders(xlEdgeTop).LineStyle = xlNone
        Selection.Borders(xlEdgeBottom).LineStyle = xlNone
        Selection.Borders(xlEdgeRight).LineStyle = xlNone
        Selection.Borders(xlInsideVertical).LineStyle = xlNone
        Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
        wbk.Close
        Sheets("MediaSchedule").Select
    End Sub
    DAPulliam64

    Hi DAPAugust64,
    The green "dogeared error flags" of the cells means that you paste numbers in these cells, but they're formated as Text.
    So you need to change the cells back to the correct format so that the lookup function works fine. You can simply call this method after pasting:
    ActiveSheet.Cells(1, 1).NumberFormat = "General"
    ActiveSheet.Cells(1, 1) = ActiveSheet.Cells(1, 1).Text
    Or use PasteSpecial method to paste the numbers as well as it's format:
    https://msdn.microsoft.com/en-us/library/office/ff837425.aspx
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I use the value returned for a function into the macro ??

    I create a function to work in a macro and I would like to use the value of parameter f_calc_error returned by function in a condition like IF, but I don't know how can I do that. I have to use the macro function CALC_ERROR ??
      Thanks.
    Edson Suzuki

    Hi Edson,
    Yes you need to use the CALC_ERROR macro function to be able to test whether the last macro function returned an error. CALC_ERROR will return an 'X' if there an error occured during the execution of the last macro function.
    You can use a macro similar to the following:
    IF
      CALC_ERROR( )
      = 'X'
          DO SOMETHING HERE
    ENDIF
    Let me explain how this works internally. The SAP system maintains a global variable g_flg_calc_error during the execution of macros in the planning book. The g_flg_calc_error variable will contain the value of f_calc_error that was set by the last macro function which executed. The ABAP coding of a planning book is something like this:
    data: g_flg_calc_error type /SAPAPO/FLAG.
    * SAP will pass g_flg_calc_error variable to all macro
    * functions. When SAP calls a macro function, it does
    * something like this.
    call function '/SAPAPO/MACRO_FUNCTION_HERE'
            exporting
              plob_values      = i_s_adv_plob_values
              sdp_book         = g_c_advf_sdp_book
              sdp_view         = g_c_advf_sdp_view
            tables
              cols_index       = i_t_cols
              value_tab        = l_t_value_tab
            changing
              f_calc_error     = g_flg_calc_error
    As you can see, the g_flg_calc_error variable
    is passed in the "changing" part of the call. The macro  function being called can then use the f_calc_error
    variable to change the value of the global
    g_flg_calc_error variable. In fact, the macro function being called can also check (by looking at the f_calc_error variable) if the last macro function reported an error.  The CALC_ERROR macro function just checks the value of f_calc_error parameter (w/c in fact is the value of the g_flg_calc_error variable) and returns "true/X" if the f_calc_error was set to true by the last macro function.
    Hope this helps in clearing things out

  • I am mac user and want to create Object in VBA macro. when i write "set objwrd=createObject("Word.Application")"- it returns "runtime error "492" can't create object". now what it alternative to create object for word in excel macro???

    I am mac user and want to create Object in VBA macro. when i write "set objwrd=createObject("Word.Application")"… it returns "runtime error "492" can't create object". now what it alternative to create object for word in excel macro???

    Any help here...
    http://support.microsoft.com/kb/288117
    http://www.macworld.com/article/1154785/welcomebackvisualbasic.html

  • Fsbtodb macro in ufs_fs.h does not return correct disk address

    I'm using fsbtodb to translate the file inode block address to file system block address.
    What I've observed is fsbtodb returns corretct disk address for all the files if file system size < 1 TB.
    But, if ufs file system size is greater than 1 TB then for some files, the macro fsbtodb does not return correct value, it returns -ve value
    Is this a known issue and is this been resolved in new versions
    Thanks in advance,
    dhd

    returns corretct disk address for all the files if file system size < 1 TB.and
    if ufs file system size is greater than 1 TB then for some files, the macro fsbtodb does not return correct value, it returns -ve valueI seem to (very) vaguely recall that you shouldn't be surprised at this example of a functional filesize limitation.
    Solaris 9 was first shipped in May 2002 and though it was the first release of that OS to have extended file attributes I do not think the developers had intended the OS to use raw filesystems larger than 1TB natively.
    That operating environment is just too old to do exactly as you hope.
    Perhaps others can describe this at greater length.

  • Wait for a return code in a Macro

    Hello,
    I have a macro in 7.5 that submits data and then waits for a return code before moving to the new step in the macro.   I have changed the sumit code to the new EPM standard, but the macro fails at the Get Events step which is where the macro waits for the return code.  The Fail message is  "Error 1004-cannot run "Get Events". Macro may not be available in this workbook or all macros are diabled."
    My current code is:
               Dim submitrefresh As New EPMAddInAutomation
               submitrefresh.SaveWorksheetData 
              ' Application.Run "MNU_ESUBMIT_REFRESH"
    'wait for the return code from the server to know the first send completed
               Dim oExcel As Object
            Set oExcel = Application.Run("GetEvents")
                Do
                DoEvents
                        Loop While oExcel.SendResult_Status = False And oExcel.SendResult_Submitted <> -1
                        'MsgBox "Send completed on server"
    Does anyone know or have the code to fix or replace this code?   I need to get a return code from the send.
    Thanks

    Hi Debra,
    SaveWorksheetData  - is synchronous method. You don't need to wait ... the next line after  SaveWorksheetData  will be executed only after save is finished.
    Vadim

  • ActiveProject.Resources return too many resources in macros

    Hello everybody.
    I've got very annoyed issue.
    I'm coding some macros which should add budget resources to project summary task automatically.
    If I open single project window, I haven't got issue.
    But when I open two different projects with different resources in different windows construct
    ActiveProject.Resources
    return resources from both openned projects together.
    How I can distribute resources from different projects and why they return together?

    Hello,
    Are you opening these two projects from project server? if yes, Could you uncheck "Load Resource Summary Assignments" check box you get on login prompt while opening Project Professional and check the issue behavior.
    When we have this checkbox selected the resources from both the plans will be visible in resource sheet.
    Hope this helps.
    Thank you,
    Kiran K.

  • How to return error message using macro or others ways

    Hi !
    I need your help to find a technical solution.
    We have an alv object with 2 parameters (a checkbox and a writable field which is for address mail.) When you push the button B1, the function module SX_INTERNET_ADDRESS_TO_NORMAL is called to verify the email address.
    If I use the classic way to show the exceptions returned by the function module, the user can read the message but when he does an action on the program this dump. (The program has been killed.)
    I am looking for a way to show the error message and the possibility to change the email address. I think that using a popup information would work but I do not find this way very nice. Can I use macro to have the message on the status? In positive case, could you explain me how to use it?
    Thanks!

    check the context in which the message statement is running, [here in sap library - message processing|http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaae335c111d1829f0000e829fbfe/frameset.htm], you will get the answer why!

  • EXCEL spreadsheet with MACROS

    WILL NUMBERS 2009 SUPPORT AN EXCEL SPREADSHEET WITH EMBEDDED MACROS?

    Looks like Excel will get macros back. This is from Wikipedia:
    Microsoft has announced that the Mac OS X version will also be released in 2010. Microsoft Office 2011 for Mac will include more robust enterprise support and greater feature parity with the Windows edition. An all-new version of Outlook with full Exchange support will return to the Mac for the first time since 2001 and replace Entourage[47], and Visual Basic for Applications (VBA, aka "macro" support) will return after being dropped in Office 2008[48][49]. There is no public beta for the Mac version,[50] however, a copy of Beta 2 (Build 14.0.0.100326) has been circulated among many Mac file sharing websites. [51]

  • PowerPoint using macro to delete text boxes after printing

    Hi,
    We created custom shows in Powerpoint and are running a macro to insert temporary page numbers on the slides before printing.  The issue is that I need to remove the page numbers after printing.  I'm a novice at VBA so I'm sure there is an easy
    solution, but nothing I've tried so far has been successful.  The code is displayed below for your reference.  Any help is greatly appreciated. Thanks!
    Sub PrintCustomShow()
          ' Change this number to specify your starting slide number.
          Const lStartNum As Long = 1
          ' Ask the user which custom show they want to print.
          Dim strShowToPrint As String, strPrompt As String
          Dim strTitle As String, strDefault As String
          ' See if any custom shows are defined.
          If ActivePresentation.SlideShowSettings.NamedSlideShows.Count _
             < 1 Then
             ' No custom shows are defined.
             ' Set up the string for the message box.
             strPrompt = "You have no custom shows defined!"
             ' Display the message box and stop the macro.
             MsgBox strPrompt, vbCritical
             End
          End If
          ' Find the page number placeholder; if found, pick up the style.
          Dim rect As PageBoxSize
          Dim oPlaceHolder As Shape
          Dim bFound As Boolean: bFound = False
          For Each oPlaceHolder In _
             ActivePresentation.SlideMaster.Shapes.Placeholders
             ' Look for the slide number placeholder.
             If oPlaceHolder.PlaceholderFormat.Type = _
                ppPlaceholderSlideNumber Then
                ' Get the position of the page number placeholder.
                rect.l = oPlaceHolder.Left
                rect.t = oPlaceHolder.Top
                rect.w = oPlaceHolder.Width
                rect.h = oPlaceHolder.Height
                ' Get the formatting of the slide number placeholder.
                oPlaceHolder.PickUp
                ' Found the slide number placeholder, so set the
                ' bFound boolean to True.
                bFound = True
                Exit For
             End If
          Next oPlaceHolder
          ' See if a slide number placeholder was found.
          ' If not found, exit the macro.
          If bFound = False Then
             ' Unable to find slide number placeholder.
             MsgBox "Your master slide does not contain a slide number " _
                & "placeholder. Add a " & vbCrLf & "slide number placeholder" _
                & " and run the macro again.", vbCritical
             End
          End If
          ' Set up the string for the input box.
          strPrompt = "Type the name of the custom show you want to print." _
             & vbCrLf & vbCrLf & "Custom Show List" & vbCrLf _
             & "==============" & vbCrLf
          ' This is the title of the input box.
          strTitle = "Print Custom Show"
          ' Use the first defined show as the default.
          strDefault = _
             ActivePresentation.SlideShowSettings.NamedSlideShows(1).Name
          ' Obtain the names of all custom slide shows.
          Dim oCustomShow As NamedSlideShow
          For Each oCustomShow In _
             ActivePresentation.SlideShowSettings.NamedSlideShows
             strPrompt = strPrompt & oCustomShow.Name & vbCrLf
          Next oCustomShow
          Dim bMatch As Boolean: bMatch = False
          ' Loop until a named show is matched or user clicks Cancel.
          While (bMatch = False)
             ' Display the input box that prompts the user to type in
             ' the slide show they want to print.
             strShowToPrint = InputBox(strPrompt, strTitle, strDefault)
             ' See if user clicked Cancel.
             If strShowToPrint = "" Then
                End
             End If
             ' Make sure the return value of the input box is a valid name.
             For Each oCustomShow In _
                ActivePresentation.SlideShowSettings.NamedSlideShows
                ' See if the show is in the NamedSlideShows collection.
                If strShowToPrint = oCustomShow.Name Then
                   bMatch = True
                   ' Leave the For loop, because a match was found.
                   Exit For
                End If
                ' No match was found.
                bMatch = False
             Next oCustomShow
          Wend
          ' Get the array of slide IDs used in the show.
          Dim vShowSlideIDs As Variant
          With ActivePresentation.SlideShowSettings
              vShowSlideIDs = .NamedSlideShows(strShowToPrint).SlideIDs
          End With
          ' Loop through the slides and turn off page numbering.
          Dim vSlideID As Variant
          Dim oSlide As Slide
          Dim Info() As SlideInfo
          ' Make room in the array.
          ReDim Preserve Info(UBound(vShowSlideIDs) - 1)
          ' Save the current background printing setting and
          ' then turn background printing off.
          Dim bBackgroundPrinting As Boolean
          bBackgroundPrinting = _
             ActivePresentation.PrintOptions.PrintInBackground
          ActivePresentation.PrintOptions.PrintInBackground = msoFalse
          ' Loop through every slide in the custom show.
          Dim x As Long: x = 0
          For Each vSlideID In vShowSlideIDs
             ' The first element in the array is zero and not used.
             If vSlideID <> 0 Then
                ' Add slide ID to the array.
                Info(x).ID = CLng(vSlideID)
                ' Get a reference to the slide.
                Set oSlide = ActivePresentation.Slides.FindBySlideID(vSlideID)
                ' Store the visible state of the page number.
                Info(x).IsVisible = oSlide.HeadersFooters.SlideNumber.Visible
                ' Turn off page numbering, if needed.
                If Info(x).IsVisible = True Then
                   oSlide.HeadersFooters.SlideNumber.Visible = msoFalse
                End If
                ' Create a text box and add a temporary page number in it.
                Dim oShape As Shape
                Set oShape = _
                   oSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, _
                                            rect.l, rect.t, _
                                            rect.w, rect.h)
                ' Apply the formatting used for the slide number placeholder to
                ' the text box you just created.
                oShape.Apply
                ' Add the page number text to the text box.
                oShape.TextFrame.TextRange = CStr(x + lStartNum)
                ' Increment the array element positon.
                x = x + 1
             End If
          Next vSlideID
    ' Print the custom show. NOTE: You must turn background printing off.
                 With ActivePresentation
                 With .PrintOptions
                 .RangeType = ppPrintNamedSlideShow
                 .SlideShowName = strShowToPrint
                 End With
                 .PrintOut
                End With
          ' Restore the slide information.
          For x = 0 To UBound(Info)
             ' Get a reference to the slide.
             Set oSlide = ActivePresentation.Slides.FindBySlideID(Info(x).ID)
             oSlide.HeadersFooters.SlideNumber.Visible = Info(x).IsVisible
          Next x
          ' Restore the background printing setting.
          ActivePresentation.PrintOptions.PrintInBackground = _
             bBackgroundPrinting
       End Sub

    Hi hlolrich,
    According to the description, you want to remove the shapes which created after you print the presentaion.
    I suggest that you name the shape you added with some rule, then we can delete thease shapes via the name rule.
    And here is a sample that you delete the shapes which name contains the
    myShape words on the first slide for your reference:
    Sub deleteShapes()
    For Each aShape In Application.ActivePresentation.Slides(1).Shapes
    If InStr(aShape.Name, "myShape") Then
    aShape.Delete
    End If
    Next aShape
    End Sub
    Also you can learn more about PowerPoint developing from link below:
    How do I... (PowerPoint 2013 developer reference)
    PowerPoint 2013
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Return data from all columns apart from a certain data type.

    Bit stuck on something, hope somebody here can help:
    I want to do a 'select * from ' a table, to return all columns except ones of a certain datatype. ie. I want to return data from all columns, excluding columns of datatype 'SDO_GEOMETRY'.
    This gives me the list of columns:
    SELECT COLUMN_NAME
    FROM   USER_TAB_COLUMNS
    WHERE TABLE_NAME = 'ORDER_ITEM'
    AND   DATA_TYPE <> 'SDO_GEOMETRY'; But I can't seem to take it any further...
    Now if I knew the columns beforehand, then of course I could just list them, excluding the geometry column, but this is to be used for a plug-in for MS Word, where a user can pick database columns to dynamically fill a report from - but I don't want the geometry columns as these can't be handled in this way.

    Hi Reggie,
    > connects to the database and presents a list of tables
    My guess is that this macro is written so it selects from all_tab_cols.
    Change that plugin and let it select from a view like the one above. That way, the users won't be able to see/pick anything that you are not able/willing to present for them.
    Edit:
    You could even tease your users, and let them see the columns, but not being able to pick them.
    create or replace view available_tab_columns
    as
       select decode(pickable.data_type, null, 0, 1) pickable
             ,atc.* -- narrow down yourself
         from all_tab_cols atc  -- or maybe user_tab_cols
             ,(select 'CHAR' data_type from dual union all
               select 'DATE' from dual union all
            select 'NUMBER' from dual
               -- complete positive list, yourself
              ) pickable
        where atc.data_type = pickable.data_type(+);Regards
    Peter
    Message was edited by:
    Peter Gjelstrup

  • Running macro on Table using Report Generation Toolkit and Office 2003 Incompatible!!!!!!!

    Hi,
    I am using some functions under the Report Generation toolkit (LabView 7.1). We recently updated our test PCs from Office 2000 to 2003. The "WORD IMPORT MODULE.VI" returns error code -41113 when used with Word 2003. No problem on Word 2000.
    In fact even the example VI available under Find Examples - Run Macro on Word Table fails and returns error code -41113 when "WORD IMPORT MODULE.VI" is called on Word 2003. Word 2000 is OK.
    Any one faced this problem???? Any solution to this problem??
    I would greatly appreciate your feedback / suggestions.
    Thanks,
    Mim

    darren,
    thanks for your reply.
    After checking the the property "Trust access to Visual Basic Project" , I get the following error message:
    Exception occured in Microsoft Word, Unable to run the specified macro. Help Path is C:\Program Files\Microsoft Office\OFFICE11\1033\wdmain11.chm and context 37401 in Word Run Macro.vi->SetFirstRowAsTableHeaderforWord(Macro).vi->Generate Report.vi
    I can run the macro directly from Word.. no problem running macros in Excel dirently either. I get error message only when running macro from LabView. So, I doubt if it is an IT issue.
    You don't have a problem with Word 2003 and Word Import Module.vi???
    I am attaching my Vi-Report Generation.vi and the subvi. I would so much appreciate if you run ReportGenerate.vi on your PC and let me know if there is a problem.
    Many Thanks for your help.
    Mim
    Attachments:
    ReportGeneration.zip ‏75 KB

  • 'Driver]Parameter missing' Error while trying to pass parameter to MS query & Return Data to Microsoft Excel

    I am trying to set up a parameter query using ODBC-Microsoft Query
    to BMC Remedy The ODBC connection is "AR System ODBC Data Source".
    I want to pass a parameter to modified date field and get all the remedy tickets for which the modified date is<= to the passed parameter date.
    So in MS query, SQL- 
    the query looks like
     WHERE ("Trouble Ticket"."Create Date">={ts '2014-10-01 00:00:00'}) AND ("Trouble Ticket"."Modified-date"<=?)
    I am getting the data fetched from database in the MS query window, but unfortunately
    When I click File-Return Data to Microsoft Excel, its showing an error: Driver]Parameter missing
    I set the connection properties- parameter-Prompt for value using the following string.
    Please help

    Hi,
    Based on the error message, I recommend we try the suggestion: Replace all "..."  with [...]
    http://www.pcreview.co.uk/forums/error-parameter-query-odbc-remedy-bmc-software-com-t3232964.html
    Then, if you want to connect the Remedy's oracle database, please see the thread:
    http://www.tek-tips.com/viewthread.cfm?qid=1123112
    We may try the workaround: Write an Excel macro which connects to the database and fetch the data based on the SQL query.
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    If you have further question about write macro, I recommend you post the question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How do I get at a variable set in the On Start macro?

    Within the On Start macro of an Access Web App, I set the variable CurrentUserEmailAddress to =UserEmailAddress.  I would like to be able to access this variable somehow from a table On Update event macro.  How can I pass this variable along?

    For those following this thread, some of the suggestions don't apply to Access Web Apps, unfortunately.
    Access Web Apps have an On Start macro (accessible from the 'Advanced' button on the Home ribbon), which runs when the app is launched in the browser.  This is a UI Macro.
    The OnUpdate event is a table event, and runs a data macro.
    As you've noticed, you can't access the UserEmailAddress() function in a data macro, and you also can't access variables set in a UI Macro.
    UI Macros and data macros run in different contexts (the former locally in the browser, and the latter on the server) so the sharing available between them is limited.
    There may be alternatives, but one possibility is to keep a table to hold variables (in this case just CurrentUserEmailAddress, but if you have more, you could use the same table).
    I would try creating a table called Vars, with a column called CurrentUserEmailAddress.  Add a single row to it (the value for CurrentUserEmailAddress is not critical, since we will override it in the OnStart macro).
    Create a data macro called SetEmailVar, that takes a Value as a parameter.  It will set the value in the Vars table.
    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <DataMacros xmlns="<DataMacro><Parameters><Parameter">http://schemas.microsoft.com/office/accessservices/2010/12/application"><DataMacro><Parameters><Parameter
    Name="Value" Type="Text" Description="Value"/></Parameters><Statements><LookUpRecord><Data><Reference>Vars</Reference><WhereCondition><Expression><Original>[ID]=1</Original><FunctionCall
    Name="="><Identifier Name="ID" Index="0"/><IntegerLiteral Value="1" Index="1"/></FunctionCall></Expression></WhereCondition></Data><Statements><EditRecord><Data/><Statements><Action
    Name="SetField"><Argument Name="Field">CurrentUserEmailAddress </Argument><ExpressionArgument Name="Value"><Expression><Original>[Value]</Original><Identifier Name="Value"/></Expression></ExpressionArgument></Action></Statements></EditRecord></Statements></LookUpRecord></Statements></DataMacro></DataMacros>
    Then create a corresponding GetEmailVar macro that will fetch the value and return it:
    <?xml version="1.0" encoding="UTF-16" standalone="no"?>
    <DataMacros xmlns="<DataMacro><Statements><LookUpRecord><Data><Reference>Vars</Reference><WhereCondition><Expression><Original>[ID]=1</Original><FunctionCall">http://schemas.microsoft.com/office/accessservices/2010/12/application"><DataMacro><Statements><LookUpRecord><Data><Reference>Vars</Reference><WhereCondition><Expression><Original>[ID]=1</Original><FunctionCall
    Name="="><Identifier Name="ID" Index="0"/><IntegerLiteral Value="1" Index="1"/></FunctionCall></Expression></WhereCondition></Data><Statements><Action Name="SetReturnVar"><Argument
    Name="Name">Value</Argument><ExpressionArgument Name="Value"><Expression><Original>[Vars].[CurrentUserEmailAddress ]</Original><Identifier Name="Vars.Email"/></Expression></ExpressionArgument></Action></Statements></LookUpRecord></Statements></DataMacro></DataMacros>
    Now in the OnStart macro you can call SetEmailVar and pass it =UserEmailAddress(), and in the tables OnUpdate macro, you can call GetEmailVar to get the value.
    Note that there is a limitation to this solution, which is that if multiple users are using the app at the same time, the variable will reflect the most recent user, so any user which gets the value will get that value, which may not be what you want.
    Another potential approach is to remove the built-in Save button from the action bar, and to write data macros to do update/insert, and call them from a custom action bar button and pass in the value from the UI macro for the button.  However, that
    solution is somewhat complicated, and won't work at all for datasheets since you can't force users to save only through the action bar button since just changing the current row will trigger a record save.

Maybe you are looking for

  • I'm a little confused as to how Apple ID works.  Do I need separate Apple IDs or email addresses for iMessage, iCloud, and Facetime?

    Do I need separate Apple IDs or email addresses for iMessage, iCloud, and Facetime? Everytime I attempt to use my Apple ID associated with iTunes with iMessage, iCloud, or Facetime, it tells me: 'Unable to verify email because it is already in use'. 

  • Portal in ABAP+Java Add-in WAS

    <b>Hi There,</b> I'm evaluating a possibility of a implementation of SAP EP 6.0 SP 11 in an WAS 6.40 ABAP+Java Add-in some peoples have spoken for me that still have problems with this implementation. Do you can help me with your experiences!? <i>Reg

  • ITunes 9 doesn't launch when iPhone is connected

    As the subject says. Updated to iTunes 9, updated iPhone to 3.1. When iPhone gets connected iTunes doesn't launch automatically. I should add though, that my ipod shuffle when connected does auto launch iTunes. Message was edited by: sig

  • Problems with the JVM versions

    Hi I am new here I was wondering if someone can help me out here I am having proplems with the versions of java. I have downloaded the lastest version and this is what i got when i verifyed my installation. Can someone help me? I have copied and past

  • Accessing information about currently playing song/media

    Hi everybody, I am wondering whether it is possible to retrieve Information about whatever is currently playing on the phone. I.e. the title of what's being played and the current position (in seconds). I would like to develop an app that is able to