Private Sub UserForm_Activate()
Label1.Caption = "The event took place"
Application.OnTime Now + TimeValue("00:00:05"), "Close_Msg"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address(False, False) = "C3" Then
UserForm1.Show
End If
End Sub
Sub Close_Msg()
unload UserForm1
End Sub
More complex than I had hoped but I'll give it a go tomorrow. Thanks for the reply. The event was a save to .pdf.
Sub Macro8()
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ThisWorkbook.Path & "\" & "file.pdf"
MsgBox "The event took place"
End Sub
CreateObject("WScript.Shell").PopUp "Your Message", [B][COLOR="#0000FF"]5[/COLOR][/B]
If I remember correctly, some people (quite a while ago now) said they had problems with the solution below, but I have never experience a problem with it myself. This single line of code will display a MessageBox for approximately 5 seconds (change the 5 for more or less display duration) after which code execution will continue. Of course, the user can dismiss the MessageBox earlier if desired.
Code:CreateObject("WScript.Shell").PopUp "Your Message", [B][COLOR=#0000FF]5[/COLOR][/B]
See this link for complete information about the various options available with this MessageBox...
http://msdn.microsoft.com/en-us/library/x83z1d9f(v=vs.85).aspx
Rick, I tried your suggestion, using "CreateObject("WScript.Shell").PopUp "Saved to Desktop", 5". The box appeared but did not turn itself off. I note that the Pop up method page is dated 2011. I am using Excel version 1905 so there may have been changes in the last 8 years.