Question:
How do you show a progress bar to show how many iterations have been calculated in VBA in excel 2007?
1970-01-01 00:00:00 UTC
How do you show a progress bar to show how many iterations have been calculated in VBA in excel 2007?
Four answers:
veloz
2016-11-13 12:31:54 UTC
Vba Progress Bar
?
2016-03-01 09:12:29 UTC
The status bar is not part of any workbook it is part of the Excel window. To see this open a new instance of Excel and fine the word Ready in the bottom left corner. Right click on that word and you will see the Customize Status Bar dialog box. Changes you make there are reflected in the status bar that includes the word Ready. I can find no indication that it is ever possible to hide the status bar in Excel 2007. If you have a display of a workbook that does not have a status bar, try closing it and then opening it from an instance of Excel that does have the status bar.
dataguy
2009-09-05 08:49:52 UTC
You can use the built in VBA status bar function: Application.StatusBar



This function alllows you to customize text to the bottom length of Excel window, the area just below the sheet tabs.



An example of the code would be:

Dim TOTAL = 10



for x = 1 to TOTAL



'code goes here



'this puts custom text in the bar

Application.StatusBar = x & " of " & TOTAL & ". " & (Round(x / TOTAL, 2) * 100) & "% Complete"



next x



' this clears the text and returns the bar to normal

Application.StatusBar = False





An example status text this will show is:

2 of 10. 20% Complete.
2009-09-03 12:33:17 UTC
There are some really good examples of what you want to do from the Microsoft related web sites, which include things to lookout for, ways of checking possible errors, and much more. Here are a couple of the better examples that should be of the best help for your current situation:



http://support.microsoft.com/kb/211736



http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.controls.progressbar.aspx





And there are some differences in how one goes about this, depending on whether or not you are using VBA Forms to work in or something else. And here are some additional references elsewhere:



http://spreadsheetpage.com/index.php/site/tip/displaying_a_progress_indicator/



http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/5bb20e99-047d-454d-9f1b-bfb6d9a67c55



http://digiassn.blogspot.com/2006/03/excel-progress-bar-indicator-with-vba.html



http://en.allexperts.com/q/Excel-1059/Progress-bar-code.htm



.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...