Timed Display Alert

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
J

J.W. Aldridge

Code works fine....

I only need this display to only display for a split second.
Do not want it to require the person to hit ok.



Dim WS As Worksheet
On Error Resume Next
Set WS = Sheets("Tempx")
On Error GoTo 0
If Not WS Is Nothing Then
MsgBox "List updated"
Application.DisplayAlerts = False
WS.Delete
Application.DisplayAlerts = True
Else
MsgBox "No List to update"
End If
 
the message box would have to be closed with keystroke commands, which makes
for messy code in my opinion. Why not think along the lines of a UserForm
with a label to convey the message through its cabtion property. That way
you can bring it up with the UserForm1.Show method and use a timer for a
couple of seconds delay then Unload UserForm1.

UserForm1.Show
s = Timer + 2
Do While Timer < s
DoEvents
Loop
Unload UserForm1
 
Back
Top