![]() |
message box pop up for a given value in a cell
Hi All,
I want a message box to automatically appear if a given value i entered in a cell. If I was writing a macro, I could do somethin like... If Range("a1").Value = "given value" Then MsgBox ("my message") End If but I want the message box to appear automatically, ie without havin to run a macro. CHEERS for any hel -- Message posted from http://www.ExcelForum.com |
message box pop up for a given value in a cell
hi
got this from http://support.microsoft.com/default.aspx? scid=kb;en-us;213612&Product=xl2002 Private Sub Worksheet_Change(ByVal Target As Range) Dim KeyCells As Range ' The variable KeyCells contains the cells that will ' cause an alert when they are changed. Set KeyCells = Range("A1:C10") <you may modify the range If Not Application.Intersect(KeyCells, Range (Target.Address)) _ Is Nothing Then ' Display a message when one of the designated cells has been ' changed. ' Place your code here. '<Insert your validation here MsgBox "Cell " & Target.Address & " has changed." End If End Sub -----Original Message----- Hi All, I want a message box to automatically appear if a given value is entered in a cell. If I was writing a macro, I could do something like... If Range("a1").Value = "given value" Then MsgBox ("my message") End If but I want the message box to appear automatically, ie without having to run a macro. CHEERS for any help --- Message posted from http://www.ExcelForum.com/ . |
message box pop up for a given value in a cell
|
All times are GMT +1. The time now is 09:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com