+ Reply to Thread
Results 1 to 4 of 4

Timer loop in one workbook disables other workbooks from being edited

  1. #1
    Registered User
    Join Date
    02-02-2015
    Location
    Portland
    MS-Off Ver
    2013
    Posts
    32

    Timer loop in one workbook disables other workbooks from being edited

    Hello,

    Currently, I have a userform that runs a timer upon clicking 'Start' and stops once 'Stop' is pressed. Once stopped, another userform asking for additional information about the timed session will display and be recorded onto the Excel sheet. My problem is that when the timer is running, users cannot edit other workbooks that they have open. Does anybody have another way of doing this that would allow users to edit other workbooks while this loop is running? Here is the code for it:
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Timer loop in one workbook disables other workbooks from being edited

    Try opening the userform as vbmodeless

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Timer loop in one workbook disables other workbooks from being edited

    Hi mason0567,

    It seems like you have two problems:
    a. The problem that mehmetcik pointed out. When you open the UserForm as Modal, by definition the rest of the Excel world is locked out in this Instance of Excel until the UserForm Closes. You could access another workbook, if it were opened in a separate instance of Excel.

    b. Your endless loop is a resource hog. If you add a delay in the loop, other workbooks should be able to be accessed. I was only able to access other workbooks using View > Switch Windows. See the changes in red below that added a delay:
    Please Login or Register  to view this content.
    The delay is for 1/4 of a second, even though your granularity is one second. The reason is to allow the application to seem responsive when you click a CommandButton.

    Lewis

  4. #4
    Registered User
    Join Date
    02-02-2015
    Location
    Portland
    MS-Off Ver
    2013
    Posts
    32

    Re: Timer loop in one workbook disables other workbooks from being edited

    Awesome, thanks for the advice. It works perfectly!

+ 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. Loop through workbooks and copy just the first sheet only to master workbook.
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-24-2014, 10:36 AM
  2. Do Until Loop - Transferring data from several workbooks to a Master workbook
    By GalsenPAP in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-10-2013, 01:00 PM
  3. Replies: 1
    Last Post: 07-20-2012, 06:20 PM
  4. Timer Loop
    By Slyone2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2010, 01:24 PM
  5. Clear cells when another cell is edited by using a loop
    By Broadway in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-16-2009, 04:21 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