ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   POP UP BOX IN EXCEL (https://www.excelbanter.com/excel-discussion-misc-queries/152690-pop-up-box-excel.html)

Peter

POP UP BOX IN EXCEL
 
I need to create a pop up box if say A1 NOT EQUAL TO B1!!!

Gord Dibben

POP UP BOX IN EXCEL
 
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.

FormatCellsCFFormula 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


On Wed, 1 Aug 2007 20:18:01 -0700, Peter
wrote:

I need to create a pop up box if say A1 NOT EQUAL TO B1!!!




All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com