Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Working while a Macro is Running.

Working while a Macro is Running

Written by Allen Wyatt (last updated September 7, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


4

Macros are great for doing the mundane (or not so mundane) processing that is often necessary with Excel data. After you start to use them, you may find that running macros can consume quite a bit of time. While you are running them, there is very little else that you can do, since Excel won't allow you to do any other work while the macro is chunking away.

The best way to do additional work is to open another instance of Excel. As you are working on one workbook in the foreground, the other instance of Excel continues to work away at the macro in the background. This approach works because Windows allows multiple instances of a program, each in its own workspace. The only thing you cannot do is work in the foreground on the same workbook which the macro is using.

In order to open a second instance of Excel, simply follow the steps you followed to open the first instance. For example, if you started Excel by calling up the Start menu and then the Programs submenu, you could do the same thing to open the second instance.

You should realize that the macro running in the background instance of Excel will be affected by you working on a different instance of Excel in the foreground. This, again, is related to how Windows treats different programs. On most systems, the background programs are given a smaller percentage of the CPU's attention than the foreground program.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2021) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Working while a Macro is Running.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Removing a List

If you have lists in your document, either bulleted or numbered, you may want to change them back to regular text at some ...

Discover More

Shortcut for Selecting a Data Range

Want to select all the data in a contiguous section of a worksheet? The shortcut discussed in this tip makes it very easy.

Discover More

Inserting Special Spaces

Do you need to frequently add en spaces and em spaces to your documents? You can add special tools to Word that make ...

Discover More

Dive Deep into Macros! Make Excel do things you thought were impossible, discover techniques you won't find anywhere else, and create powerful automated reports. Bill Jelen and Tracy Syrstad help you instantly visualize information to make it actionable. You’ll find step-by-step instructions, real-world case studies, and 50 workbooks packed with examples and solutions. Check out Microsoft Excel 2019 VBA and Macros today!

More ExcelTips (menu)

Understanding the Select Case Structure

One of the powerful programming structures available in VBA is the Select Case structure. This tip explains how you can ...

Discover More

Documenting Changes in VBA Code

Your company may be regulated by requirements that it document any changes to the macros in an Excel worksheet. Your ...

Discover More

Changing Directories in a Macro

Need to specify which directory on your hard drive should be used by a macro? It's easy to do using the ChDir command.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is four more than 3?

2020-09-18 04:27:33

Barry

See my comment below👇👇


2020-09-17 11:07:40

Steve Froess

https://excel.tips.net/T002021_Working_while_a_Macro_is_Running.html

Great but it doesn't work.

It used to be the case that I could open (once six) instances of excel running macros simultaneously. I have a video of this, it's pretty cool.

Fast forward to now, Windows Office Excel 2016 and you can't do that.

I can of course open multiple instances of excel, but if one ir running a macro (takes 42 minutes to run), I can't do ANYTHING with the others. How do I get around this?


2017-07-13 02:23:47

Barry

@Vahan

Yes there is a way, within the macro you need to have a "DoEvents" instructions, probably within the loop that is taking the time to execute.

This will make the macro run slower but it allows you to work on the same workbook.

One proviso though; changing values in the workbook might affect the running of the macro, therefore the coding of the macro must take this into account. You can also get some odd effects such as the user making a change and the macro changing it back or to a different value, ideally the macro should warn the user to avoid confusion.


2017-07-12 02:30:42

Vahan

What if I want to work on the same excel file, that my macro is running on? Is there a way to do your job while macro is running in the background?
thanks.


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.