|
-
Dec 8th, 1999, 04:12 AM
#1
Thread Starter
Fanatic Member
I wrote a program, which opens some files in Excel (to be more specific 7 files), takes some info from each file, and puts it in the 8th file (also created from my app). I had no problems with that, but now I need to put something like ProgressBar kind of thing, so the user knows how long it will take to finish the process. I know how to use ProgressBar, but how can I find out how long will it take to finish the process???????
Thanks for your reply.
------------------
Visual Basic Programmer
------------------
PolComSoft
You will hear a lot about it.
-
Dec 8th, 1999, 04:28 AM
#2
A progress bar is usually set up to indicate the status of some action and not how long it takes. So what you could do would define a constant equal to 14.28 (= 100/7) and each time you are done with one of your 7 files, update ProgressBar1.Value = ProgressBar1.Value + YourConstant. If there are some spots within each file manipulation that you can get at, you could add more, finer, updates to the progress bar and make its visual change smoother.
------------------
Marty
[This message has been edited by MartinLiss (edited 12-08-1999).]
-
Dec 8th, 1999, 05:02 AM
#3
Guru
Why so much calculation?
ProgressBar1.Min = 0
ProgressBar1.Max = 7
ProgressBar1.Value = <Number of files completed>
------------------
Yonatan
Teenage Programmer
E-Mail: [email protected]
ICQ: 19552879
AIM: RYoni69
-
Dec 8th, 1999, 02:50 PM
#4
Addicted Member
If you want your user to know what ther percentage complete is you could use:
'Set the percentage of the progress bat
'to the label
lblPercent = Format(((pg.Max - pg.Min) / 100) * pg.Value, 0)
And for time, just have a timer control that increments a variable every second, then when one file is completed (or whatever you want to use as a reference) you can say estimated time remaining is 6 * that variable.
------------------
Micah Carrick
Ordinary joe, only not named joe.
http://micah.carrick.com
[email protected]
ICQ: 53480225
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|