ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   % completed box (https://www.excelbanter.com/excel-programming/373298-%25-completed-box.html)

Arne Hegefors

% completed box
 
I have a rather lengthy macro that basically loops through a long list of
company names. This macro takes appr. 20 minutes to run and therefore I would
like to give the user some idea of how long time has gone/is left. What I
would like is some sort of a message box that shows where the process is in
the code. I have an integer that is the length of the list and another
variable that is a counter. In terms of code:
Assume i = position and k = length of list.

For i= 1 to k
€¦€¦do some stuff
Next

Thus it would be really nice if I could have some message box that shows eg:
Msgbox €œNumber of companies searched: €œ & I & €œ. Total number of companies:
€œ & k

Or something like that. Please help how to construct such a thing. Thank you
very much!!!


Bob Phillips

% completed box
 
Use a progress meter. Robin Hammond has a nice one at

http://www.enhanceddatasystems.com/E...rogressBar.htm

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Arne Hegefors" wrote in message
...
I have a rather lengthy macro that basically loops through a long list of
company names. This macro takes appr. 20 minutes to run and therefore I

would
like to give the user some idea of how long time has gone/is left. What I
would like is some sort of a message box that shows where the process is

in
the code. I have an integer that is the length of the list and another
variable that is a counter. In terms of code:
Assume i = position and k = length of list.

For i= 1 to k
..do some stuff
Next

Thus it would be really nice if I could have some message box that shows

eg:
Msgbox "Number of companies searched: " & I & ". Total number of

companies:
" & k

Or something like that. Please help how to construct such a thing. Thank

you
very much!!!





All times are GMT +1. The time now is 04:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com