Solved

Progress Bar

Posted on 2001-06-14
3
247 Views
Last Modified: 2010-05-02
Ok, I really feel like a moron having to ask this question but my brain is fried. I have a form with a progress bar and a timer. The form is just for visual. I want to simulate that the app is grading an exam so I am using a progress bar for the effect. I have the timer's interval set to 3000. Can someone provide me with the code to update the progress bar while the timer is running its interval? I apologize for having to ask this question. Thanks for your help.

BTW - running VB6, ado2.6
0
Comment
Question by:stacey14
3 Comments
 

Accepted Solution

by:
_Rha7_ earned 40 total points
ID: 6193174

  Just set the sglIncrement variable to whatever you want the increment to be, the Min & Max values can be set at design time in the properties of the control, have fun :)

  _Rha7_

============================================
Dim sglIncrement As Single

Private Sub Form_Load()

  Me.ProgressBar1.Min = 0#
  Me.ProgressBar1.Max = 100#
  sglIncrement = 1#
 
End Sub

Private Sub Timer1_Timer()
  If Me.ProgressBar1.Value < Me.ProgressBar1.Max Then
    Me.ProgressBar1.Value = Me.ProgressBar1.Value + sglIncrement
  Else
    Me.Timer1.Enabled = False
  End If
End Sub
============================================
0
 
LVL 4

Expert Comment

by:amit_panjwani
ID: 6193898
I assume that what rha7 suggested is near towhat you are asking, only if could be more clear what you wanted to do viz
Update Progress bar synchronizing it with Timer or Database Records

If you want to sync progressbar with Timer - rha7 has offered solution . Else you have to be clear

would you like to use another Timer for same purpose ?

Amit
0
 

Expert Comment

by:costello
ID: 6400333
Force accepting Rha' answer.

costello
Community Support Moderator @ Experts-Exchange
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA Word macro - how to get characters after the searched for string 5 93
VB 6.0 printer how to align 6 66
Copy a row 12 62
Passing a Text Box name to a Sub 6 99
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

792 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