Consulting

Results 1 to 16 of 16

Thread: Problem with ProgressBar

  1. #1
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    237
    Location

    Problem with ProgressBar

    Hello to all
    I would like to ask is there anyone who can help me with two things in my file is related to the "ProgressBar"?
    Attachment with a "UserForm" and a few buttons it with Admissions macros for each of them . I've made one "ProgressBar", but do not know how to do that when I press any button, it activates and shows me as percentages from 0 % to 100 % (ie 100% is assumed that the macro has done its work ) and then hides it (Unload) and so for each button pressed .
    The other thing I can think - if you have for each button I will make my own "ProgressBar" and pressing the desired button will be displayed upon completion of the required action to be hidden.
    And how can we do to work together on selected macro button?
    I would be very grateful for assistance from your side.
    Link to file
    I made a request in this forum, but no one has answered my query.

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,646
    You'd better invest in speeding up your code than slowing it down by a 'pro'gress Bar.

  3. #3
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    237
    Location
    I can understand that, but the problem is that in most cases when you press one of the buttons there (how to say) as a kind of delay while the macro fulfill its purpose. This figuratively speaking is not visible and the person thinks that the macro has completed its task, in which is pressing the next button and excel file confuses. Therefore looking for options to suggest when I finish a macro to select another button (macro).
    Generally accept other ideas.
    If something comes to your mind you are always welcome.
    Thank you in advance

  4. #4
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    As to a lack of answers, it may be that others experience the same as I, in not having at least one of the libraries you have referenced; to wit:

    MISSING: Controls 1.0 Type Library

    Location: C:\Program Files\Nero\Nero WaveEditor\Controls.dll

    I see that 'Microsoft Windows Common Controls 6.0 (SP6)' is also referenced ( C:\Windows\system32\MSCOMCTL.OCX ), and although it doesn't show as missing, I don't see it in the folder?

    Anyways, what version of Excel are you using? What version of Windows?

    You may wish to consider making a pseudo progress bar out of labels.

    Mark

  5. #5
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    237
    Location
    Hello
    you may be right - for missing answers, but I can not understand what the role of Nero in excel?
    I see that 'Microsoft Windows Common Controls 6.0 (SP6)' is also referenced ( C:\Windows\system32\MSCOMCTL.OCX ), and although it doesn't show as missing, I don't see it in the folder?
    You also can not figure out what kind of file you're talking about but if I understand you correctly I will show you pictures where I'm taking this "ProgressBar"
    7236141d.jpgAs to what windows used - it can not give you a specific answer because of my flash drive I sit on different computers used by XP to windows 8.1. To excel, I think that the important thing is that all files are abbreviated (.xls) and not in the format (.xlsx)
    If you have another an inquiry'm available to answer and I hope I have understood correctly your questions.
    Thank you in advance

  6. #6
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    I downloaded once and cannot seem to again. Could you post the file here instead? Use the <Go Advanced> button and scoll down to manage attachments.

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    The guy in the other thread is responding, so it seems best to leave it to him over at MrExcel.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #8
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Hi Bob

    Okay.

    Gosh, it has been a bit, hasn't it? Too tired to be sociable tonight, but maybe in a couple of days.

    Hope all is blessed at your end :-)

    Mark

  9. #9
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    237
    Location
    Hi - I tried the macro proposed by colleague (my last post), but gives me an error
    I'll be glad if you can see why it does this
    Attached Files Attached Files

  10. #10
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Personally, no! It is unfair in my view to be playing both forums, I have wasted enough time in the past because the question was also being dealt with elsewhere. I feel you should go and ask the guy at MrExcel who provided that solution, he may be working on it as we speak.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  11. #11
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    237
    Location
    Please understand me correctly with what I write - I understand that writing in two forums is not very correct.
    But if you trace it - you can see that I 've written - if I do not answered or if I answered and then I error occurs in the code of the macro.
    In another forum I asked my colleague I shared it gives me an error, and he replied that he could not understand where the problem is. You know that if I knew how to fix it, I would not ask. It would like to ask you - How long should I wait and if he did not answer me ask you in this forum ?
    Thank you very much and please do not blame me, do you still have forums so it can help those who do not understand!?

  12. #12
    Create two labels, name them lblProgress1 and lblProgress2
    make sure lblProgress1 has a border
    make sure lblProgress2 has a background color (the color you want the progress bar to have)
    Make sure lblProgress2 has a width of zero
    Position them on top of each other

    Now use code like this to update the progressbars (dRatio should be between 0 and 1)

            lblProgress2.Width = lblProgress1.Width * dRatio
    Me.Repaint
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  13. #13
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    237
    Location
    Hello
    please excuse me but I'm not sure I can do it, if you could do it in a file provided by me and show me where to put (or updated its) this extra line in the macro.
    Thank you warmly.

  14. #14
    See attached...
    Attached Files Attached Files
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  15. #15
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    237
    Location
    This is really very good, but please look at my file - as the idea would work with buttons and macros for them.
    You may have involuntarily missed this text in my inquiry.
    Thank you heart

  16. #16
    I'm sorry, but this forum is run by volunteers, you are supposed to do most of the work yourself, not have it done for you.
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •