+ Reply to Thread
Results 1 to 3 of 3

Make Excel wait

  1. #1
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Make Excel wait

    So I have some line of code:

    Please Login or Register  to view this content.
    After the above event occurs, I want excel to wait 2-3 seconds to finish updating it's DDE-links. It's vital that all Excel functions keep running as normal while this wait is occuring, then run this line of code:

    Please Login or Register  to view this content.
    Can something like this be done? I seem to remember when forcing Excel to wait everything just seems to stop dead.
    Last edited by Test123Test; 09-24-2013 at 09:49 AM.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Make Excel wait

    First try Wait............from VBA Help:

    Please Login or Register  to view this content.
    But if DDE is suspended during the wait, use an OnTime Event macro.
    Gary's Student

  3. #3
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Re: Make Excel wait

    Hi, I tried Application.Wait (Now + TimeValue("0:00:1")), unfortunately everything including DDE gets suspended. For more context of what I'm looking to do, my Excel autosubmits an order via DDE to a trading platform when a condition is met. The condition relies on information from my current portfolio fed into Excel via DDE. After the order is filled, there is around a one second delay until the portfolio information updates in Excel and includes my most recent order. The problem I'm having, is that the portfolio information is part of the condition responsible for autosubmitting the order in the first place, and unless it's updated immediately upon the order being filled, it will keep autosubmitting orders until the DDE link updates with the new portfolio information and the condition becomes inactive.
    Last edited by Test123Test; 09-23-2013 at 01:32 PM.

+ 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. Make macro wait for process to complete
    By pjaj in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-13-2012, 01:05 AM
  2. Make macro wait for process to complete
    By shawnh in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 02-16-2010, 07:52 PM
  3. Make Modaless form wait for 'OK' click
    By duckboy1981 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2009, 07:42 AM
  4. Make it wait
    By Rhapsodie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2009, 03:47 PM
  5. Is there a way to WAIT in Excel without using 100% CPU?
    By Marc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2006, 06:15 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