General
This "could" work. I added a msgbox() so you can see the results too. But
you can remove those results. This will beep one time per session of having
this spreadsheet in memory when the criterion is met. If cell B1 has a
number greater than 5 entered in it, you'll get the beep and message. Place
this code as follows:
Hit Alt-F11, select Microsoft Excel ObjectsThis Workbook
Paste the code in. Then Hit Alt-F11 again and test it. Good luck. The
reason I said "could" work is that your request was so ambiguous I wasn't
sure exactly how you wanted the thing to work.
Public ReportCell
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Cells(1, 2).Value 5 Then
If ReportCell = 0 Then
Let ReportCell = 1
Beep
MsgBox ("beep inserted here!")
End If
End If
End Sub
|