i have been working with vb6 for a while but never had the pleasure of using
progress bars. That is until now, one of the programs i have written has
just been modified so that large csv files of 100,000+ lines can be imported
into a database.
the import works fine but the progress bar feature is not working correctly.
The progress bar is set to a max value of the number of records in the csv
file, the records are then imported and the progress bar runs from from zero
to max no problem.
however under the progress bar is a text box that should display the
percentage and update with each import loop but it doesnt update. it stays
blank until the full import is complete then it will show 100%. but if you
step through the program in debug mode the text box updates correctly.
has anyone had any joys with this control. any ideas will be appreciated.
the full import routine is too big to post so i have simplified the progress
bar into a loop if anyone wants to have a look.
Private Sub cmdStart_Click( )
While ProgressBar1.Va lue < ProgressBar1.Ma x
Do
ProgressBar1.Va lue = ProgressBar1.Va lue + 1
txtPercentage.T ext = (ProgressBar1.V alue / ProgressBar1.Ma x) * 100 & "%"
Loop
Wend
End Sub
Cheers
Paul
progress bars. That is until now, one of the programs i have written has
just been modified so that large csv files of 100,000+ lines can be imported
into a database.
the import works fine but the progress bar feature is not working correctly.
The progress bar is set to a max value of the number of records in the csv
file, the records are then imported and the progress bar runs from from zero
to max no problem.
however under the progress bar is a text box that should display the
percentage and update with each import loop but it doesnt update. it stays
blank until the full import is complete then it will show 100%. but if you
step through the program in debug mode the text box updates correctly.
has anyone had any joys with this control. any ideas will be appreciated.
the full import routine is too big to post so i have simplified the progress
bar into a loop if anyone wants to have a look.
Private Sub cmdStart_Click( )
While ProgressBar1.Va lue < ProgressBar1.Ma x
Do
ProgressBar1.Va lue = ProgressBar1.Va lue + 1
txtPercentage.T ext = (ProgressBar1.V alue / ProgressBar1.Ma x) * 100 & "%"
Loop
Wend
End Sub
Cheers
Paul
Comment