Good Day!

I don't how to use a timer and progress bar control properly. I created a new form which consist of the timer and progressbar control. My code is like this:

Private Sub Form_Load()
Timer1.Interval = 1000
pBar.Max = 100
pBar.Min = 0
pBar.Value = 10
End Sub

Private Sub Form_Unload(Cancel As Integer)
pBar.Value = 100
Timer1.Interval = 0
Timer1.Enabled = False
End Sub

Private Sub Timer1_Timer()
If pBar < 100 Then
pBar.Value = pBar.Value + 10
End If
End Sub
Before I start a process, i load this form...then after the process i unload this form. But the timer is not functioning. I want to show the progressbar as my process is progressing. How will i do this?

Thanks a lot.