Timed Display Alert

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
 
J

JLGWhiz

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top