Thread: Alarm
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
L. Howard Kittle L. Howard Kittle is offline
external usenet poster
 
Posts: 698
Default Alarm

Try this in the sheet module. Not sure where I got it, I did not write it,
I just made small adjustments to it.. Change Range(A5) and cell value to
suit.

Private Declare Function Beep Lib _
"kernel32" (ByVal dwFreq As Long, _
ByVal dwDuration As Long) As Long

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

"Tomas" wrote in message
...
Could someone help me, please?

Is there any function in excel which would be able to play some sound
alarm
if the value in selected cell is for example higher than 10?

Thanks in advance

Jiri