4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by avirooge
0

try this

Private Sub cmdStart_Click()
While ProgressBar1.Value < ProgressBar1.Max
Do
ProgressBar1.Value = ProgressBar1.Value + 1
text1.Text = (ProgressBar1.Value / ProgressBar1.Max) * 100 & "%"
Loop
Wend
End Sub
0

Hi Masterace,

First change your field to numeric (for eg. 50% to 50) then you use below code.

ProgressBar1.Value = txtProgress.Text

in the above code txtProgress is the assumed text box in which your indicated progress is displayed.

Good Luck

0

Private Sub Form_Load()

Timer1.Enabled = False
ProgressBar1.Value = 0
Timer1_Timer
End Sub

Private Sub Timer1_Timer()

Timer1.Enabled = True

ProgressBar1.Value = ProgressBar1.Value + 1
ProgressBar1.Value & "%"
If ProgressBar1.Value >= 100 Then
' do whatever you want
Timer1.Enabled = False
End If

End Sub
Avinash Rooge
avirooge@yahoo.com

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.