Every time the cell value in BG1 changes I want a message box displaying the value of BG1 ( which will usually be like "BEWARE 940" etc. This I want to incorporate in the following existing code:-
Please help me if you can....![]()
Dim OldValue1 Dim OldValue2 Dim OldValue3 Dim OldValue4 Dim OldValue5 Private Sub Worksheet_Calculate() If [D1] <> OldValue1 Then Application.EnableEvents = False [G1] = [G1] + 1 OldValue1 = [D1] Application.EnableEvents = True End If If [D2] <> OldValue2 Then Application.EnableEvents = False [G2] = [G2] + 1 OldValue2 = [D2] Application.EnableEvents = True End If If [D3] <> OldValue3 Then Application.EnableEvents = False [G3] = [G3] + 1 OldValue3 = [D3] Application.EnableEvents = True End If If [D4] <> OldValue4 Then Application.EnableEvents = False [G4] = [G4] + 1 OldValue4 = [D4] Application.EnableEvents = True End If If [D5] <> OldValue5 Then Application.EnableEvents = False [G5] = [G5] + 1 OldValue5 = [D5] Application.EnableEvents = True End If End Sub
Bookmarks