Message Box on Input

  • Thread starter Thread starter Seanie
  • Start date Start date
S

Seanie

How can I create a Message Box that Pops up when a value entered in a
Cell is greater than 0? This this box should display for 5 seconds
without the user being able to exit from it. Is this possible?

I don't wish to use the display message within Data Validation for
this

Thanks
 
Hi,

This will display a message box for 5 seconds if a value > 0 is entered in
A1. I don't know how to make it appear without an OK button, perhaps someone
will show us how. Right click your sheet tab, view code and paste the code in.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Or _
Target.Value = 0 Or _
Not IsNumeric(Target) Then Exit Sub
Dim Msg As String
Dim Secs As Long
Dim Wsh As Object
Title = "A Message Box"
Msg = "This will close in 5 seconds."
Secs = 5
Set Wsh = CreateObject("WScript.Shell")
RetVal = Wsh.Popup(Msg, Secs, Title, vbExclamation)
Set Wsh = Nothing
End Sub

Mike
 
How can I create a Message Box that Pops up when a value entered in a
Cell is greater than 0? This this box should display for 5 seconds
without the user being able to exit from it. Is this possible?

I don't wish to use the display message within Data Validation for
this

Thanks

You can do this, provided you are not using the built in MSG BOX.
 
Back
Top