+ Reply to Thread
Results 1 to 2 of 2

Creating a 'pause' in the middle of your sub

  1. #1
    Registered User
    Join Date
    03-18-2015
    Location
    Minneapolis, MN
    MS-Off Ver
    2013
    Posts
    1

    Creating a 'pause' in the middle of your sub

    Hello everyone,

    I'm new around here and relatively new to VBA. I'm working on a workbook which is transmitting and receiving information on a DDE platform. I have some code written to perform various actions which is working just fine. I want to create a sub that does a few things, then transmits the results off of my workbook. It then has to wait for a response, a confirmation number. This much is working fine as well but I think the time it takes to get that confirmation number is causing the problems for me. Is there a way to cause the code to stop executing for say 1 second while it gets this confirmation number and then finish executing the sub with this new confirmation number? I tried using the Application.Wait function (and then specify how long to wait) and on the surface that works fine, meaning that excel pauses the execution for as long as I tell it to, but I'm thinking it's also suspending the data transfer as well so when it resumes execution, it still doesn't have the information (confirmation #) I'm waiting for. Is there a way to get around this? Can I pause the code execution and still receive the confirmation # I'm waiting for and then finish out the code with the new data?
    Thanks, I appreciate the help.

    Brennan

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Creating a 'pause' in the middle of your sub

    Have you tired
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

+ 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. Replies: 3
    Last Post: 02-17-2015, 05:16 PM
  2. creating a pause in an excel macro
    By fbjnail1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-15-2013, 01:26 AM
  3. [SOLVED] How to convert First, Middle, Last name to Last, First Middle Initial with VBA
    By lwine in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-30-2013, 03:33 PM
  4. Extracting the Middle Initial/Middle Name
    By akwishestofish in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-16-2012, 11:13 AM
  5. Best way to pause?
    By Ramthebuffs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2006, 11:48 PM

Tags for this Thread

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