Try this .. define a global variable , ProgressCount
B4X:
Timer1.Initialize("Timer1",100)
Timer1.Enabled = True
Sub Timer1_Tick
If ProgressCount < 100 Then
ProgressCount = ProgressCount + 5
ProgressBar1.Progress = ProgressCount
Else
Timer1.Enabled = False
End If
End Sub