+ Reply to Thread
Results 1 to 9 of 9

Help... Using a user form to show progress inside a loop

  1. #1
    Forum Contributor
    Join Date
    03-15-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    w 10, Excel 2016
    Posts
    125

    Help... Using a user form to show progress inside a loop

    I have a very simple userform with only one text field (Name=SpecID) - Inside a loop, I want to use the form to show progress on the form using the text field... I'm using

    Please Login or Register  to view this content.
    It shows the text in the form OK - but the code stops and waits for me to manually close the from (click X) before the loop continues.

    How can I just show the text on the form and keep the code running through the loop to show progress without stopping for a manual close of the form?

    Thanks for your help
    Last edited by Andrew Entee; 03-13-2017 at 04:33 PM.

  2. #2
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Help... Using a user form to show progress inside a loop

    Hi,
    Show us code of your loop or upload file with your userform.

  3. #3
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Help... Using a user form to show progress inside a loop

    The code stops because showing a userform without specifying how it is to be displayed will show it modally... In other words, the code that loads the userform pauses until it is unloaded. If you want the code to continue then you must show the userform modelessly.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Help... Using a user form to show progress inside a loop

    And... no matter if it's 3 or 300 lines of code.

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  5. #5
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Its a Model Wonk, I think :)

    Removed my answer after refreshing and seeing cytop's note....

    ( I think I did not say much more anyway... added few links, screenshot and stuff... )

    Edit later
    and then later.......

    Put it back....

    _.____________________________________________________________________



    I think I had this problem once, I do not quite understand why... something like
    ' there are two ways ( modes ) of showing a form in vb - modal and modeless. a modal form takes the focus and won't return control to the calling module until it is closed. a modeless form is shown and then control is immediately returned to the calling module. http://vbcity.com/forums/t/53342.aspx

    Here you go:
    http://stackoverflow.com/questions/1...code-execution
    http://vbcity.com/forums/t/53342.aspx
    http://gregmaxey.mvps.org/word_tip_p...nced_tips.html


    _......_____________________________________--

    I think the "Model" thingy is needed to be changed, or else I expect the default is to wait for you to do something in the UserForm before it moves on...

    You need this I think:
    Please Login or Register  to view this content.
    I think this is the same, but I am not quite sure

    Please Login or Register  to view this content.

    ModelWonks.JPG http://imgur.com/sJI5bDa
    ModelWonks.JPG


    Alan
    Last edited by Doc.AElstein; 03-13-2017 at 04:47 PM. Reason: Saw cytop's note after refreshing, took it out, and then put it back in - Oh er Missus
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

  6. #6
    Forum Contributor
    Join Date
    03-15-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    w 10, Excel 2016
    Posts
    125

    Re: Help... Using a user form to show progress inside a loop

    Thanks for your replies and assistance. I consider myself admonished and educated regarding code tags.

  7. #7
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Help... Using a user form to show progress inside a loop

    Quote Originally Posted by Andrew Entee View Post
    ...I consider myself admonished and educated regarding code tags.
    Hi, Andrew,
    So how about Editing your first post and putting the Code Tags in so that I can post my contribution. - I did not have a lot to add, but it could be useful for future reference

    Alan

  8. #8
    Forum Contributor
    Join Date
    03-15-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    w 10, Excel 2016
    Posts
    125

    Re: Help... Using a user form to show progress inside a loop

    Thanks Alan... Done. I see how that works and helps now.

  9. #9
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Help... Using a user form to show progress inside a loop

    Quote Originally Posted by Andrew Entee View Post
    Thanks Alan... Done. I see how that works and helps now.
    Thanks, put my thing back in

+ 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. [SOLVED] User form/ to show please wait
    By Momo in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-06-2022, 05:10 AM
  2. [SOLVED] Show new user form after clicking ok
    By marius1304 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-03-2015, 01:43 PM
  3. Loop to show form
    By gsandy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-08-2015, 03:47 PM
  4. [SOLVED] Excel user form- If/Then statement outcome to show on user form
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2013, 09:16 AM
  5. user form progress indicator
    By confused99 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2009, 03:19 PM
  6. List inside of a user form
    By sentinela in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-15-2009, 09:58 AM
  7. Opening form to show the progress status
    By akabraha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2007, 07:58 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