Option Explicit
Const p As Byte = 5
Private Sub UserForm_Activate()
Dim i As Integer, j As Double
j = Label2.Width
For i = p To 0 Step -1
Application.Wait Now + TimeValue("00:00:01")
Label1.Caption = i
Label2.Width = IIf(i > 0, Label2.Width - (j / (p + 1)), 0)
Me.Repaint
DoEvents
Next i
Unload Me
UserForm2.Show 0
End Sub
Private Sub UserForm_Initialize()
Label1.Caption = p
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then End
End Sub