Solved

Progress Bar: <To Kamall>

Posted on 1998-06-02
2
196 Views
Last Modified: 2010-05-03
Hi Kamall,
   Need your advice on progress bar again. The codes that you have provided works perfectly fine. But If i were to apply it into a do while loop. What would be the codes I need to modify in order to capture the processing accurately that means when my loop ends, my progress bar should end too. (Worst still is that I can only get the maximum value when my do while loop end.)Thus I was thinking how I could assign a value to progressbar1.max=value at the begining which we have been doing in a for loop.

Below are my codes:

Do while not EOF(1)
ProgressBar1.visible=true
ProgressBar1.Max=int_progress
......

record=record+1    //this is the place which my counter increase
........          //and only loop end then would I be able to
........         //know the no of records being processed.


ProgressBar1.Value=int_progress
int_progress=int_progress+1

Loop
ProgressBar1.visble=False

Problem: My ProgressBar will always reach the end before my Do loop ends. Could you Please advise?
0
Comment
Question by:heng
2 Comments
 

Accepted Solution

by:
eyaltil earned 50 total points
ID: 1462361
hi,
i had the same problem a week ago.

solution:
open the file twice.
the first one, for calculating the records number (so u would now the progressbar1.max.
the second one, for doing what u want.

it is not an elegant way but it works
0
 

Author Comment

by:heng
ID: 1462362
I should have thought of that! Thanks
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question