Option Explicit
Private Sub CommandButton1_Click()
Dim i As Integer
For i = 0 To 10
Me.lblPercentage.Caption = i
Application.Wait Now + TimeValue("00:00:01")
Next i
End Sub
I misunderstood what you doing. What was your code doing when you did not see an update of your caption? Did you try inserting "DoEvents" into your original code?
Private Sub CommandButton1_Click()
Dim i As Integer, j As Integer
For i = 1 To 10000
Cells(i, 1).Value = "a"
Cells(i, 2).Value = "b"
Cells(i, 3).Value = "c"
Cells(i, 4).Value = "d"
For j = 0 To 30
Me.lblPercentage.Caption = i
Next j
Next i
End Sub
For Each objControl In .Controls
objControl.Enabled = False
Next objControl
For Each objControl In .Controls
objControl.Enabled = False
DoEvents
Next objControl
Private Sub CommandButton1_Click()
Dim i As Integer, j As Integer
For i = 1 To 10000
Cells(i, 1).Value = "a"
Cells(i, 2).Value = "b"
Cells(i, 3).Value = "c"
Cells(i, 4).Value = "d"
For j = 0 To 30
Me.lblPercentage.Caption = i
DoEvents
Next j
Next i
End Sub