POP UP BOX IN EXCEL

  • Thread starter Thread starter Guest
  • Start date Start date
How are the values in A1 and B1 derived?

It might be easiest to place Conditional Formatting on A1 so's it turns color if
not equal to B1.

Format>Cells>CF>Formula is: =$A$1<>$B$1

Format to a color and OK

Alternate method for a real pop up box.....................

This sheet event code will be triggered by a calculated change in A1

Private Sub Worksheet_Calculate()
On Error GoTo stoppit
Application.EnableEvents = False
With Me.Range("A1")
If .Value <> Range("B1").Value Then
MsgBox "Please be advised that A1 does not equal B1!!!"
End If
End With
stoppit:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP
 
Back
Top