View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
moi moi is offline
external usenet poster
 
Posts: 27
Default pop up message depending on cell value

In VB Editor (ALT-F11) double click Sheet1, then paste

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target = 6 Then
MsgBox "Correct"
ElseIf Target = 7 Then
MsgBox "Incorrect"
ElseIf Target = 8 Then
MsgBox "Try again"
End If
End If
End Sub


"John Davies" schreef in bericht
...
is it possible to have different messages automatically pop up depending
on
certain cell values. e.g. if a1=6 a message would pop up with "correct",
if
a1=7 a message would pop up with "incorrect", if a1=8 a message would pop
up
with "try again" etc.