+ Reply to Thread
Results 1 to 5 of 5

Timer in userform, userform set ShowModal property false

  1. #1
    Registered User
    Join Date
    07-31-2016
    Location
    Holland
    MS-Off Ver
    2019
    Posts
    74

    Timer in userform, userform set ShowModal property false

    Good morning all,

    I have the following code in a user form to start, stop and reset a timer.

    the ShowModal property of userform1 must be set to False in IDE, otherwise the timer doesn't work. Is there a way to make the code so that the property of userform1 cab be set to True in IDE ? I need this so it will work with other user forms.

    Hope someone can help .

    Please Login or Register  to view this content.
    The following code is in Module1.

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    07-31-2016
    Location
    Holland
    MS-Off Ver
    2019
    Posts
    74

    Re: Timer in userform, userform set ShowModal property false

    Hope someone can help, I searched the internet but found no solution so far.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Timer in userform, userform set ShowModal property false

    "Is there a way to make the code so that the property of userform1 cab be set to True in IDE ? I need this so it will work with other user forms."

    Not certain that is very clear.

    If you mean being able to work with other things while the Timer Form is visible and running, the the "SHOW MODAL" property would need to be set to False.

    ????
    Attached Files Attached Files
    Last edited by Logit; 04-13-2020 at 12:34 PM.

  4. #4
    Registered User
    Join Date
    07-31-2016
    Location
    Holland
    MS-Off Ver
    2019
    Posts
    74

    Re: Timer in userform, userform set ShowModal property false

    Hi Logit, the "SHOW MODAL" property of userform1 needs to be on True, now it is on False. The problem is when I set the "SHOW MODAL" property of userform1 True the Public Sub TimeLoop doesn't work. There is no countdown in label1.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Timer in userform, userform set ShowModal property false

    If you use a object to reference the userform you can show MODAL and update contents with timer.

    If you modify the module code in Logit's example,

    Please Login or Register  to view this content.
    The form is modal and timer works.

    I think the real issue is the userforms state when the other user forms are displayed. Once set to MODAL you can only show other modal userforms, you can not mix form states
    Cheers
    Andy
    www.andypope.info

+ 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. Userfrom Property ShowModal = False
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-23-2017, 11:51 AM
  2. Timer (UserForm)
    By Remphan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2016, 06:20 PM
  3. [SOLVED] Timer on userform - run in background if we close the userform
    By nicenari in forum Excel General
    Replies: 6
    Last Post: 06-10-2015, 02:54 PM
  4. Timer in Userform
    By calvinle in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2014, 09:15 AM
  5. Userform Timer
    By BPB in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2012, 11:02 AM
  6. ShowModal property
    By VJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2005, 01:06 PM
  7. How to get ShowModal property
    By Andrea in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2005, 09:32 AM

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