Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Location
    Texas, United Arab Emirates
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pause-Resume Macro (XP)

    I have written a group of macros that query the user for data and populate three sheets with the data and some formulas. What I need is a way to pause the user input (it can be a lot of data), save where in the macro I am and then at a later time (could be a reboot in between) come back and continue inputting data.
    Anyone done this or know how? TIA,

    John

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pause-Resume Macro (XP)

    Can you store the data in the worksheet and save the workbook? You could also save a code that tells you where to start back.
    Legare Coleman

  3. #3
    New Lounger
    Join Date
    Sep 2002
    Location
    Texas, United Arab Emirates
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pause-Resume Macro (XP)

    Legare,
    Thanks for the reply. Yes I could store all the variables (loop vars and such) in the workbook and then read them back when I reinitialize. I was hoping for a built in but maybe that is too much to ask.

    John

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pause-Resume Macro (XP)

    You could setup a worksheet to accept all entries (protected, using data, validation to get the input you want).

    Then have a button the user has to press when he/she is finished inputting. Have your macro that runs after pressing that button check all input.

    This way the user can write everything into this sheet, save it at will, close XL, reboot, whatever and finish by pressing the button.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  5. #5
    New Lounger
    Join Date
    Sep 2002
    Location
    Texas, United Arab Emirates
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pause-Resume Macro (XP)

    Jan,
    Thanks for the suggestion. I was hoping for a solution that would still be able to "ask" the user for the input rather than have them have to deal with getting in the right cell and all. I may have to g this route if nothing else surfaces (here or in my brain).
    THanks again for the reply.

    John

  6. #6
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pause-Resume Macro (XP)

    You could of course have the workbook_open event check the content of the data-entry worksheet and act accordingly. And of course after a save, the workbook will open with the same active cell as when the workbook was saved.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  7. #7
    New Lounger
    Join Date
    Sep 2002
    Location
    Texas, United Arab Emirates
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pause-Resume Macro (XP)

    Jan,
    Thanks for the reply. I had thought of doing that as the macro curently runs from the Workbook open event. It seems it would just be a matter of figuring out where I am in the data entry process and then branching to the proper location with the variables set accordingly. Might tak a little rewrite and some logic to allow stopping only at certain points in the data entry loop.
    Thanks again,

    John

Posting Permissions

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