Banner

Saturday, February 11, 2017

Processor Bar In Userform Excell VBA





Private Sub CommandButton1_Click()

Dim i As Long

For i = 1 To 5000 Step 3

Me.Label2.Width = Me.Label2.Width + 0.3

DoEvents

Me.Caption = i / 50 & "%"

Me.Label2.Caption = i / 50 & "%"

If Me.Label2.Width >= 300 Then

Me.Label2.BackColor = vbYellow

End If

Next i

Me.Caption = "Completed"

Me.Label2.Caption = "Completed"

Me.Label2.TextAlign = fmTextAlignCenter

End Sub

1 comment:

Please do not enter any spam message in comment box