+ Reply to Thread
Results 1 to 4 of 4

Pausing macro until .xla function completes

  1. #1
    Registered User
    Join Date
    11-16-2007
    Posts
    1

    Pausing macro until .xla function completes

    At work we use the Hyperion Financial Management application (HFM). This has an add on for Excel (.xla) that allows us to extract values from the Hyperion backend data into Excel. We create Excel formulas that describe the data we want to retrieve and then select the "Refresh Retrieve" option from the HFM menu in Excel to retrieve the financial data.

    Since I refresh the same retrieves over and over I would like to automate my monthly reporting tasks that basically consist of refreshing retrieves in multiple workbooks, printing the new reports and exiting the workbook.

    I have tried for months through our company IT HFM specialists to find out how to call a "refresh" from VBA. They have apparently not received a response from Hyperion and so I can't call the routine from the .xla code. However, after a very long search I found the SendKeys function in VBA and can now at least execute a "refresh" by simulating the keyboard actions to run a refresh manually.

    Here is my problem. When I kick off a refresh, the entire process can take up to a minute or two. How can I get my macro to wait until the refresh is finished before continuing? The cursor goes into an hourglass while "refresh" is being carried out. I can get Excel to "wait" for a specified time, but that seems to screw up the "refresh". It seems that any continuation of the macro interrupts the refresh process. Anyway I would like to have Excel wait only while the cursor is in the hourglass form. When the refresh is done, I would like the macro to continue immediately.

    Bottom line: Is there a way to have the refresh function maintain control until the refresh has finished? Does it make a difference that I'm "calling" the refresh via the SendKeys command rather than directly from the .xla?

    Thanks.
    Last edited by rtylerdunn; 11-16-2007 at 03:09 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Pausing macro until .xla function completes

    I have extensive experience using VBA to interface with Hyperion Essbase(pulling, sending, calculating, etc)...but none with HFM.

    If there is an HFM VBA code module from Hyperion it hopefully includes a synchronous/asynchronous parameter for pulling data. You'd want the pull to be synchronous...so processing waits for the pull to finish.

    I hope that helps.
    Post back if you have more questions.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    I have no expeirence with Hyperion Financial Management

    Can you use the Application.Cursor command to test the mouse shape

    maybe something like this

    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Registered User
    Join Date
    11-16-2007
    Posts
    5
    you can use like

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    in macro
    Last edited by VBA Noob; 11-16-2007 at 06:06 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1