How can I set an alarm Excel?

L

L. Howard Kittle

Try this in the worksheet VBA editor. If the value of A5 is greater than 50
you get a beep.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim frequency As Long
Dim duration As Long
If Target <> Range("A5") Then Exit Sub
If Target.Value > 50 Then
frequency = 4160
duration = 1500
Call Beep(frequency, duration)
End If
End Sub

HTH
Regards,
Howard
 
O

Otto Moehrbach

Annell
This little macro will cause a beeping sound (one beep) if C5 is greater
than 5. Right-click your sheet tab and select View Code. Paste this macro
into that module. "X" out of the module to return to your sheet. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("C5")) Is Nothing Then _
If Target > 5 Then Beep
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top