+ Reply to Thread
Results 1 to 5 of 5

progress bar userform inside userform not working

  1. #1
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    progress bar userform inside userform not working

    I have a userform that deletes some data but it takes a long time. I'm trying to use a progress bar to let users know its working. I have a progress bar userform that I'm already using but I cant get it to work inside the userform.

    The code inside userform2 that deletes info is: Basically it looks at option buttons then clears content of 6 ranges depending on the option button selected.

    Please Login or Register  to view this content.
    The progress bar userform1 code is

    Please Login or Register  to view this content.
    The progress bar was used in another part of the program so im trying to retrofit it to fit the Clear_click() code above. I know its not correct yet but i cant even start to debug it because it errors on the first line "userform1.show". Any help would be greatly appreciated.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,936

    Re: progress bar userform inside userform not working

    When it errors out on the UserForm1.Show line and highlights it, press F8 repeatedly to step through the code line by line.
    It will continue through the code and eventually you will get to the line that causes the issue.

    Let us know what that line is and if possible attach a desensitized version of your file. Always much easier to help if we can see that.

    BSB

  3. #3
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: progress bar userform inside userform not working

    its sayin runtime error 401: cant show non-modal form when modal form is displayed. Ill try to make a sample and upload it.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: progress bar userform inside userform not working

    You need to show your first userform modelessly.

    To do that either set the ShowModal property to False or use this when opening the form.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  5. #5
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: progress bar userform inside userform not working

    Here is the sample workbook. I had to erase the old progress bar code but the userform is there as userform1. when you open it click on the "file station" button and userform2 will open. I would like to have a progress bar that shows progress when the red "Clear data set" and "Clear all data" command buttons are activated\


    Edit: Thx Norie that worked.. Still need to make it work but at least it runs now If you have any suggestions on how to integrate that into the clear data codes i'd love the advise. I need it to update the progress bar after each range has been cleared... 6 or 7 total ranges. Not sure how to do that yet.
    Attached Files Attached Files
    Last edited by kevinu; 05-22-2018 at 05:51 PM.

+ 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. How to change the code inside a userform by using another userform
    By king05 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-20-2017, 02:10 PM
  2. Userform frame progress bar for userform completion
    By ABSTRAKTUS in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-12-2017, 11:20 AM
  3. Placing a userform inside another userform
    By thibodc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2015, 10:20 PM
  4. [SOLVED] Showing UserForm to Indicate Progress, Macro Doesn't Run Until I Exit UserForm
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-21-2014, 07:00 PM
  5. Replies: 1
    Last Post: 08-06-2014, 10:29 PM
  6. [SOLVED] Progress bar in userform
    By MariaPap in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-26-2014, 01:34 AM
  7. [SOLVED] Userform design from Microsoft Office Excel 2003 Programming Inside Out not working
    By Stratfordoaks in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-11-2013, 01:55 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