Excel VBA Progress Bar on Userform

  Рет қаралды 72,758

Computergaga

Computergaga

Күн бұрын

Пікірлер: 95
@sanssatori
@sanssatori 5 жыл бұрын
Something happened which has never happened watching anybody else's tutorials. It worked the first time!!!! Thank for your clear and concise video, this was really nice.
@Computergaga
@Computergaga 5 жыл бұрын
You're very welcome.
@wickedlikethreesixes5167
@wickedlikethreesixes5167 4 жыл бұрын
This really helped me out a lot, thank you. Before this video I found code online for implementing progress bars and it was well beyond my programming capabilities.
@Computergaga
@Computergaga 4 жыл бұрын
Great to hear. Thank you Tim.
@PHobbs
@PHobbs 5 жыл бұрын
I tend to overthink things, and was thinking a project like this would be more difficult. Thank you for the tutorial, and showing me how easy this script is.
@Computergaga
@Computergaga 5 жыл бұрын
You're welcome buddy.
@dennismorley1647
@dennismorley1647 4 жыл бұрын
Great explanation and demonstration and easy to follow. Have been meaning to install this feature but have always thought it too difficult, and then within minutes I had it running in my macro - I'm so chuffed now. Many thanks - so grateful for your contribution.
@Computergaga
@Computergaga 4 жыл бұрын
You are welcome! Thank you Dennis.
@noeliamontero3839
@noeliamontero3839 2 жыл бұрын
Great explanation for VBA beginners, thanks so much!
@Computergaga
@Computergaga 2 жыл бұрын
Thank you, Noelia.
@philipmcdonnell7168
@philipmcdonnell7168 3 жыл бұрын
Thanks Alan. This was one of the first videos of your that I watched and until today have never made it work (my brain being somewhat addled). Today, however, I got it to work: I had to slot the contents of the Do While into a For Next loop that loads records into a worksheet from a db and formats them for UX reasons. Now I just have to get tricky with it. ;)
@georgeloizides7555
@georgeloizides7555 2 жыл бұрын
Very Illustrative Example . Thank you very much sir!
@Computergaga
@Computergaga 2 жыл бұрын
You're welcome. Thank you.
@abrieventer157
@abrieventer157 4 жыл бұрын
Thanx for this easy to understand video. Method is easier than others I have seen. Thanx again.
@Computergaga
@Computergaga 4 жыл бұрын
My pleasure. Thank you Abrie.
@JanBolhuis
@JanBolhuis 2 жыл бұрын
Great video and well explained. Thank you.
@Computergaga
@Computergaga 2 жыл бұрын
Thank you, Jan.
@LuckVagner
@LuckVagner 4 жыл бұрын
Very easy to understand, great job!!!
@Computergaga
@Computergaga 4 жыл бұрын
Thank you Luca.
@anthonyfisiihoi
@anthonyfisiihoi 4 жыл бұрын
Great tutorial and explanation. Clear and precise! *thumbs up*
@Computergaga
@Computergaga 4 жыл бұрын
Thank you, Anthony.
@minhafathima9535
@minhafathima9535 3 жыл бұрын
Great Sir, you are my super hero
@Computergaga
@Computergaga 3 жыл бұрын
😊
@kennytait8431
@kennytait8431 6 жыл бұрын
Thanks a lot, this is a great bit of code and your video is really easy to follow. I had a userform connected to a macro that just displayed the comment "Calculating ....... Please Wait", but this is so much better. I simply added a bar as you described into my existing userform. My only problem was that I have no loop in my macro. Solved that by simply adding the update lines with a new width / percentage number at various stages of my code.
@Computergaga
@Computergaga 6 жыл бұрын
Awesome, well done Kenny.
@mohammadarif4153
@mohammadarif4153 3 жыл бұрын
Excellent...very helpful....
@Computergaga
@Computergaga 3 жыл бұрын
Thank you, Mohammad.
@prayan72
@prayan72 Жыл бұрын
Thank you! Great video. Is there a way to put the button "cancel" in the form so that if it takes too long the user can abort the procedure?
@evandawson1037
@evandawson1037 4 жыл бұрын
This is just fabulous! Just exactly what i expected to do for my project!
@Computergaga
@Computergaga 4 жыл бұрын
Fantastic!
@KleanthisSkoulikaris
@KleanthisSkoulikaris 3 жыл бұрын
WOW! Just....WOW!!!
@Computergaga
@Computergaga 3 жыл бұрын
👍
@kennethschuman167
@kennethschuman167 Жыл бұрын
Great video! I worked along with several progress bar video’s but with yours was simple AND mainly I got it to work, SO MANY THANKS. One question; after the progress bar macro ends there is a 5 second delay as my full macro updates and ends. Can this 5 sec. delay be incorporated in the progress bar display?
@ДмитрийПахомов-б6у
@ДмитрийПахомов-б6у 6 жыл бұрын
Thanks a lot! So easy!
@Computergaga
@Computergaga 6 жыл бұрын
You're welcome.
@johnadam7996
@johnadam7996 4 жыл бұрын
thank you for this amazing tutorial
@Computergaga
@Computergaga 4 жыл бұрын
You're welcome. Thank you John.
@HerculesSantosLoyola
@HerculesSantosLoyola 5 жыл бұрын
Parabéns pela aula, eu achei incrível.
@Computergaga
@Computergaga 5 жыл бұрын
Thank you.
@HerculesSantosLoyola
@HerculesSantosLoyola 5 жыл бұрын
@@Computergaga embora eu não fale Inglês, consegui perfeitamente entender a sua aula e executar com sucesso a barra de progresso. Parabéns pelo seu ótimo trabalho, sou muito grato!
@javierlira6033
@javierlira6033 5 жыл бұрын
wonderfull... i made a similar subroutine but I used the statusbar... but it was a desperate solution with the clock ticking... thanks for the video, i will improve my program with it
@Computergaga
@Computergaga 5 жыл бұрын
Thank you Javier.
@hungskya820l7
@hungskya820l7 4 жыл бұрын
Very Good. Thanks
@Computergaga
@Computergaga 4 жыл бұрын
Thank you.
@aymen.zaggar
@aymen.zaggar 4 жыл бұрын
We can also divide progressbar.width by progressframe.width to get the percent without adding another variable
@Computergaga
@Computergaga 4 жыл бұрын
Great
@aposieczanek
@aposieczanek 3 жыл бұрын
What do you do if the % of 100% complete is unknown? or undefined? Are you still able to use a progress bar?
@user-yy6vn7ig2d
@user-yy6vn7ig2d 4 жыл бұрын
Can it be done on a range as well? To copy range cells from sheet to another. For example A2:C60
@johnleo6419
@johnleo6419 3 жыл бұрын
I have a question: I’d like to keep a bunch of stuff in my userform (100s of frames, labels and other objects) which are overlapping on each other. So It’s becoming very difficult to work on those, is there a way we can hide/unhide the frames on the userfom ?? Because every frame I use covers the entire userform, and there are many objects inside each frame. So I wanted hide all other frames except the one I’m working on, and again I’ll hide this and unhide another frame which I’ll work on and so on… I’m not asking to hide/unhide these frames after running the VBA, I know how to do that. I want to know if it’s possible to hide while we are coding
@simxschl
@simxschl 3 жыл бұрын
This progress bar works well but the macro seems to take MINUTES longer (700 sec instead of 8 sec normally) if I use "Application.ScreenUpdating = False". If I don't use "Application.ScreenUpdating = False" then it's about 18 sec which is kinda okay but I don't like that flickering of the macro when it switches between worksheets
@tonnievaneldik9183
@tonnievaneldik9183 4 жыл бұрын
How can i use this ProgressBar in my files so it appear when i run a macro. I don't understand how it can be work on my files.
@sisoader7391
@sisoader7391 2 жыл бұрын
GOOD JOB.THANK YOU. HOW CAN I USE THIS PROGRESSBAR IN ACCESS TO IMPORT EXCEL FILES. THANKS
@Computergaga
@Computergaga 2 жыл бұрын
Thank you. It all works from the loop. So, whatever macro you are creating, set the loop to track the progress how you need it. I can' provide all the code here.
@canmanttv3306
@canmanttv3306 3 жыл бұрын
Great video! Just one problem, I did basically the exact same thing you did in the video, but trying to make the form in the personal workbook, as well as the module is in the personal workbook. I am wondering if this is even possible. When I call "Progress", it says "file not found" and then error 361. I have no idea if this is even possible, but please help!
@canmanttv3306
@canmanttv3306 3 жыл бұрын
Nevermind, I got it figured out the next day thank you so much
@Sysco360
@Sysco360 6 жыл бұрын
It's wizardly when you make genius look like child's play. I am a rank noob but would like to add the progress bar to display while a SQL Query refreshes after clicking a button assigned to Macro calling Refresh.
@Computergaga
@Computergaga 6 жыл бұрын
Thanks Adam.
@Sysco360
@Sysco360 6 жыл бұрын
Most welcome! :) but guess I should have been more clear... I was hoping for some help with that... if it's not too big a deal?
@Computergaga
@Computergaga 6 жыл бұрын
To update the progress bar we would need a stage to frequently update it. If the SQL refresh is one statement, I'm not sure how we can do this. For example, in the video we can check the update through the loop and have a rough estimate of progress. Unless we could query how far through the refresh the SQL query is, we cannot estimate this.
@Sysco360
@Sysco360 6 жыл бұрын
Thanks for the reply Alan. I actually understand what you are saying, which is something. What if I knew that the query takes on average say 4min 35sec and really does not deviate from that amount of time. Would it be possible to tie the progress bar to that, but also have it terminate early if the SQL query finishes before that estimated time? p.s. Like to buy you a coffee card for your help or 'donate' somehow. your videos are priceless sir! Do you have Starbucks or a donation account?
@Computergaga
@Computergaga 6 жыл бұрын
Hi Adam, not something I have done so am unsure how to update based on time. I do not have a donation card. Thank you for your kind offer.
@Elchimbotanito69
@Elchimbotanito69 4 жыл бұрын
Thank you! Lo pude utilizar en mi aplicativo. Saludos de Perú
@Computergaga
@Computergaga 4 жыл бұрын
De nada, Walter.
@sudiptaghosh326
@sudiptaghosh326 6 жыл бұрын
Sir first of all thank u so much for your valuable training. Sir I made a Inventory Software based on excel which has 6 sheets... those are ITEM LIST MASTER COPY, INVOICE GENERATOR, RECEIVED LIST, ISSUED LIST, CURRENT STOCK AND SALES REPORT.... all are inter connected. In invoice template I can bill 20 items at a time. This template has few macro buttons like stock update, save as pdf, sales report, new invoice etc... When I run Stock update button, My "Issued List" sheet updates with sales item and also items deducts from Current Stock Sheet which shows balance stock. Sir my problem is When I am entering items in Invoice template for billing its very hard to track each items balance stock... My question is sir Is there any options to make such a display which will show the current stock of that particular item which ĺ enter in invoice template for billing???
@Computergaga
@Computergaga 6 жыл бұрын
Absolutely. As you enter the item number we can run a search and return the stock level into a cell.
@mithunjan18
@mithunjan18 4 жыл бұрын
How should a make this pgress bar working if i dont have any Do while or Each cell loop in my macro.... i have 19 modules in my macro and all 18 are called from module 1. Is it possible to run this progress bar whenever each module completed..... ?
@Computergaga
@Computergaga 4 жыл бұрын
For sure. You just need to increment the bar a little after each module. I used a loop, it could be anything. 100/18 and increment by that percentage each time as a rough guide to progress.
@SandeepKumar-sb3pq
@SandeepKumar-sb3pq 6 жыл бұрын
Awesome video, thanks, but I do have one question , I have got almost 20 different columns which has 20 different loops running , so for each loop I have to introduce the call function ? So if one loop finishes (I.e code gets executed for one column) then won’t the progress bar be 100% and be misleading ? Thanks
@Computergaga
@Computergaga 6 жыл бұрын
You can update the progress bar whenever you want Sandeep so that it is as accurate as you want it to be. So you could update it after each call function. So it updates 5% after each call for example. It is just a guide to progress.
@SandeepKumar-sb3pq
@SandeepKumar-sb3pq 6 жыл бұрын
Thank you Sir for your reply, i finally figured it out with your help :)
@PHobbs
@PHobbs 5 жыл бұрын
Sandeep, I would imagine you could calculate the percentage of total cells looped through rather than the total rows that Computergaga does in this video. So if each column has 1000 rows of data to be looped through, and you're looping through 5 columns, you would just calculate the percentage of 5000 cells total that you're looping through.
@sanssatori
@sanssatori 5 жыл бұрын
​@@Computergaga This is EXACTLY what I need. Can you give me some more guidance or direction on how to do this?
@RAragao
@RAragao 5 жыл бұрын
@@SandeepKumar-sb3pq would you be kind to let us now how did you use this code for more than 1 loop through several columns?
@BrewMAJret
@BrewMAJret 7 жыл бұрын
This is great. You have a single line of code encapsulated by the Progress Bar script. I like to put things into my Personal.xlsb like your progress bar. I have several instances where the progress bar would be cool, but it would not be practical to encapsulate each of my macros with it. Is there a way to call the progress bar script from my existing macros?
@Computergaga
@Computergaga 7 жыл бұрын
Absolutely. The progress bar script can be stored in your Personal.xlsb and run using Application.Run(Personal.xlsb!ProgressBar") This could open your userform. Depending on the macro and what it does, you may have to tweak how it calculates the macro progress though.
@BrewMAJret
@BrewMAJret 7 жыл бұрын
Thanks for your quick reply. BTW, I follow you on Twitter and your Tweet caught my attention, and your excellent video intrigued me. I looked at several other Progress Bar videos and yours was by far the best one. To further explain my question, your solution encapsulates your actual macro (increase each value in column J by 10%) with the progress bar. If I were to call a progress bar macro via the application.run(personal.xlsb!ProgressBar) macro, then how would I insert my actual macro (instead of increasing values in column J by 10%) back into the ProgressBar macro? Macro A calls ProgressBar macro, but ProgressBar needs to track the progress of macro A or B or ... I don't really have a project for this. I was just trying to take your method to the next step and make it portable either by making it an addon, function or macro in my personal.xlsb. Sorry if all this is outside the scope of a KZbin comment :)
@Computergaga
@Computergaga 7 жыл бұрын
Thank you very much for your comments. Much appreciated. Yes to generalise the macro by putting it into a Personal.xlsb file is difficult because the method of calculating macro progress would differ depending on what the macro does. You may be able to have the Progress form in Personal.xlsb and the sub with the userform initialisation and the variables for bar.width and text.caption. But the progress calculation would probably have to happen in the sub of the active workbook.
@richardgreves6161
@richardgreves6161 5 жыл бұрын
@@Computergaga I tried this, and while the sub is called properly (the form is initialized and shows up on the screen, the BarWidth variable crashes (BarWidth = Progress.Border.Width * CurrentProgress). It says object required
@hokh5003
@hokh5003 4 жыл бұрын
Hi, how about progress bar when we loop through the file in the folder?
@Computergaga
@Computergaga 4 жыл бұрын
Yes, you can do this with the same technique demonstrated in the video. Maybe count the number of files in the folder and then use that as your percent to work through.
@vivekkashyap7732
@vivekkashyap7732 5 жыл бұрын
Great.. My code is without loops.. I call many subs in my code.. How can I use this without loop.. please help
@Computergaga
@Computergaga 5 жыл бұрын
You could maybe use the sub calls as progress. It depends on the macro and how you would like to show updates. Loops are an obvious choice. But if you have say 4 sub calls. you could update the progress bar by 25% each time.
@satyenpurohit3947
@satyenpurohit3947 7 жыл бұрын
Can we increase speed of progress bar, if yes, then how
@Computergaga
@Computergaga 7 жыл бұрын
The speed of the progress bar is determined by the macro and how long it takes. We could speed it up by making it update less often. So in my video example, get it to update every other row.
@priya.8170
@priya.8170 4 жыл бұрын
Its not Working kindly help me
@Computergaga
@Computergaga 4 жыл бұрын
I can't help without seeing what might be wrong. Please check through the video again to look for any mistakes.
@raysomnaths
@raysomnaths 2 жыл бұрын
SSS [Simple Smart Solution]
@Computergaga
@Computergaga 2 жыл бұрын
👍
@kanavkohli794
@kanavkohli794 5 жыл бұрын
Too confusing, you need to explain it clearer
@Computergaga
@Computergaga 5 жыл бұрын
Very sorry Kanav.
@kanavkohli794
@kanavkohli794 5 жыл бұрын
@@Computergaga eh its ok. Im kind of a noob anyway 🤪
@Computergaga
@Computergaga 5 жыл бұрын
Keep plugging away Kanav.
Excel VBA Macro: Progress Bar While Macro is Running (UserForm)
11:51
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 28 МЛН
Шок. Никокадо Авокадо похудел на 110 кг
00:44
Люблю детей 💕💕💕🥰 #aminkavitaminka #aminokka #miminka #дети
00:24
Аминка Витаминка
Рет қаралды 1,4 МЛН
Automatically Refresh PivotTable - Excel VBA
12:10
Computergaga
Рет қаралды 57 М.
Can Jewel Bearings Be Pressed In The Home Shop?
17:37
Clickspring
Рет қаралды 139 М.
Ultimate Progress Bar Control in VBA Userform
12:40
PK: An Excel Expert
Рет қаралды 39 М.
The Very mojor Repairing Of Broken Differential Gear Ring By Very Brilliant Mechanic…
34:47
How to Hide Excel and Show Userform ONLY - Excel VBA
10:50
ExcelVbaIsFun
Рет қаралды 288 М.
Progress bars in Excel using VBA (Tutorial)
5:34
Extreme Automation - Kamal Girdher
Рет қаралды 25 М.
Excel VBA Forms Part 20 - Progress Bars
22:39
WiseOwlTutorials
Рет қаралды 28 М.
How to Create  Progress Bar in Excel with VBA
6:13
Dinesh Kumar Takyar
Рет қаралды 15 М.
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 28 МЛН