Hi
Is it possible to have picture to replace the sound file in this code below. Any ideas please?
Function Alarm(cell, Condition)
Dim WAVFile As String
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
On Error GoTo ErrHandler
If Evaluate(cell.Value & Condition) Then
WAVFile = ThisWorkbook.Path & "\left.wav" 'Edit this statement
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
Alarm = True
Else: WAVFile = ThisWorkbook.Path & "\right.wav" 'Edit this statement
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
Exit Function
End If
ErrHandler:
Alarm = False
End Function
Bookmarks