Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
MsgBox "The back color of the form will change 5 seconds after you close this message box."
Sleep 5000
Me.BackColor = vbBlue
End Sub
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
MsgBox "The back color of the form will change 5 seconds after you close this message box."
Sleep 5000
Me.BackColor = vbBlue
End Sub