+ Reply to Thread
Results 1 to 5 of 5

Excel VBA pausing for Bloomberg

  1. #1
    Registered User
    Join Date
    04-29-2014
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Excel VBA pausing for Bloomberg

    Hi,

    I am new to VBA and trying to create a macro where it will begin by inserting today's date into a cell, then pause for roughly 35 seconds while the massive correlation matrix pulls all the correlations of the portfolio in, then takes an output value that is generated in the workbook from the filled correlation matrix (correlation coefficient) and copy's and pastes it in a different cell. Then it repeats this process again using "Today's date - 1" (yesterday's date), waiting 35 seconds again and taking the new output value and copy and pasting it below the previous one.

    I know I am not close but here is what I have for code thus far (which does not work properly). Thank you so much for any help.

    Please Login or Register  to view this content.
    Last edited by mbush2; 04-30-2014 at 11:30 AM.

  2. #2
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Excel VBA pausing for Bloomberg

    If the code all resides in VBA, then it should 'wait' for code to complete before executing the next line. You shouldn't need a wait.

    If you want to insert one for whatever reason, you can use the following. Be sure to place the declarations before any subroutines in your code:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-29-2014
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Excel VBA pausing for Bloomberg

    The calculations reside outside of VBA in the actual workbook. They are a data pull in from bloomberg. It is a 75 x 75 matrix and each cell within it has a =BDP function pulling in correlation between to Stock Prices (that is why I takes 35 seconds for it to get pulled in). The pause I have built in right now Application.OnTime works well with waiting to run the second macro that does the copy and pasting but not sure how to get it all to fit together with a loop.

  4. #4
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Excel VBA pausing for Bloomberg

    THis is untested, but try dropping the 'DoEvents' command before the 'Next i'. This may help.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Excel VBA pausing for Bloomberg

    Welcome to the forum.

    We'd like to help you but first..

    Pls take some minutes to read forum rules and specially-in this case- rule#3 and add code tags around your code.
    Then anyone will be able to help you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel VBA and Bloomberg
    By freidhofr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2013, 10:12 AM
  2. Excel+Bloomberg+vba
    By Vooodu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-04-2011, 04:35 PM
  3. Pausing in Excel VBA
    By Joey Lichtenstein in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2006, 08:10 AM
  4. [SOLVED] Open an Excel Workbook from either a BAT (or VBS) without pausing.
    By CRayF in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2005, 12:05 AM
  5. Pausing macro for user Excel input
    By TomD in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-08-2005, 01:05 PM

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