+ Reply to Thread
Results 1 to 4 of 4

Do already running macros terminate if the excel workbook is closed?

  1. #1
    Registered User
    Join Date
    12-06-2009
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Do already running macros terminate if the excel workbook is closed?

    Hi All,

    Consider the below macro -

    Please Login or Register  to view this content.
    So the above macro basically runs every 1 minute (the execution time is well less than 1 minute). But the trouble is that if I close the excel workbook to which this macro is associated but keep other excel sheets open, the macro still runs when it's 1 minute is over.

    How can this problem be overcome. I was under the assumption that closing an excel sheet will automatically terminate all the macros associated with it.

  2. #2
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Akron, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: Do already running macros terminate if the excel workbook is closed?

    You have to "Turn it Off"

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-06-2009
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Do already running macros terminate if the excel workbook is closed?

    Quote Originally Posted by jrdnoland View Post
    You have to "Turn it Off"

    Please Login or Register  to view this content.
    Can you throw some more light..

  4. #4
    Registered User
    Join Date
    12-06-2009
    Location
    Florida, USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Do already running macros terminate if the excel workbook is closed?

    Ok JRDNO, that helped. Thanks.

    I had to put it this way. Time2 had to be defined as a global variable and WORKBOOK_NAME is a global constant with the workbook name.

    Please Login or Register  to view this content.
    Every single line was important. Wish there is an easier way.

+ 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