+ Reply to Thread
Results 1 to 3 of 3

Perform one task at a time

  1. #1
    Registered User
    Join Date
    07-06-2007
    Posts
    8

    Put my code on some kind of delay

    My question involves two workbooks: In workbook1 I have created a code that opens, renames and resaves workbook2. However, When workbook 2 opens it will automatically begin to run a code that can take any amount of time depending upon how long it takes to refresh certain information. My problem is that what command can I put in workbook1 that won't allow it to resave or close workbook2 untill the code has finished running. Thanks so much for you help.
    Last edited by VBA Noob; 11-09-2007 at 12:23 PM.

  2. #2
    Registered User
    Join Date
    07-06-2007
    Posts
    8

    Perform one task at a time

    I don't want my code to go to the next line of code until that command has been completely carried out (such as reshing information, or opending a workbook). THanks
    Last edited by VBA Noob; 11-09-2007 at 12:42 PM.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello tchristie33,

    When you open Workbook 2 from a macro in Workbook 1, control won't return to Workbook 1 until Workbook 2 has finished running. Unless you are open Workbook 2 as a hidden process, I don't see where the problem is. It would be help to see the code you are using.

    Sincerely,
    Leith Ross

+ 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