-
Progress meter step?
Hello Everyone:
My progress meter finishes too soon. I want my meter to end on the last loop. But instead it finishes on the first step of the loop instead of the last loop. I know I am missing something very simple, but I have no idea as to what it is?
Code:
Do Until Num1 = 0
If Num1 <= 0 Then Exit Do
Do Until x = 0
If x <= 0 Then Exit Do
pBar1.Visible = True
pBar1.Minimum = 1
pBar1.Maximum = 2
pBar1.Value = 1
pBar1.Step = 1
pBar1.PerformStep()
MessageBox.Show("The meter has " & x & " Times, And the program has looped " & Num1 & " Times")
x -= 1
Num1 -= 1
Num2 += 1
Loop
Loop
Thanks
Art W.
-
Re: Progress meter step?
'value = 0
pBar1.Value = 1 'value = 1
pBar1.Step = 1
pBar1.PerformStep() 'value += 1
'value now = 2
-
Re: Progress meter step?
put Num1 -= 1
after the first loop.
Edit and also x -=1 on the inside loop will find x as zero on the next num1 loop.