Ok, I think this might work:

Code:
b = FileLen("C:\Command.com") / 8000
If b = 0 Then b = 1
b2 = 100 / b
b3 = b2

'lil code here

If b3 < 100 Then
ProgressBar1.Value = b3
timeout 0.0000001
End If
b3 = b3 + b2

'the rest of the code here

ProgressBar1.Value = b3
timeout 0.0000001
ProgressBar1.Value = 100