+ Reply to Thread
Results 1 to 5 of 5

Can't Work On Other Spreadsheets While Macro Is Running

  1. #1
    Registered User
    Join Date
    09-24-2010
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2007
    Posts
    21

    Can't Work On Other Spreadsheets While Macro Is Running

    I have a spreadsheet with 4 tabs. Each tab shows the status of a production line. The macro below continually scrolls from one tab to the next, with the display attached to a TV for associates to view the statuses. When the macro is running, I cannot work on any other spreadsheets. All I get is the blue spinning wheel.

    Is there a way to accomplish scrolling through the tabs of the spreadsheet and allow the PC to work on other spreadsheets?

    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Can't Work On Other Spreadsheets While Macro Is Running

    Add code as shown. When that line is executed it will allow Excel to regain control long enough to service interrupts caused by user actions. However, be wary of the user doing anything that could mess up what your macro is trying to do. In this case I don't think it's a problem, but in general this technique should only be used with a bit of analysis.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,377

    Re: Can't Work On Other Spreadsheets While Macro Is Running

    The other thing you might try is to open a second instance of Excel. So, one for your display to run in and one for you to work on.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    09-24-2010
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Can't Work On Other Spreadsheets While Macro Is Running

    Unfortunately adding the DoEvents line of code did not solve the issue.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Can't Work On Other Spreadsheets While Macro Is Running

    How is Timer getting a value?

    The Wait statement cannot be interrupted, so even if this works you have to wait up to 5 seconds for a response.

    If I get some time I will try running your code to see what happens, but I need to also see any code that deals with Timer. Having your file would be ideal.

+ 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. macro running on all opened excel spreadsheets
    By gontariu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-05-2018, 01:36 AM
  2. Cannot Open New Spreadsheets While Stopwatch Macro is Running
    By isabela1214 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2015, 03:45 PM
  3. Replies: 0
    Last Post: 09-23-2014, 02:13 PM
  4. Is there a way to work around running macro on a protected workbook?
    By LLL0422 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2014, 09:20 PM
  5. Time + Now Wait does not work with other macro running
    By SRA in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2013, 08:11 AM
  6. [SOLVED] running a macro when opening a work book
    By madhatter40 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-23-2013, 05:16 PM
  7. After running an email macro other macros will not work.
    By dynamicexcel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-29-2012, 06:42 PM

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