I need help with this spreadsheet. We cannot load the sound files on computers, so the files need to be embedded. They can be a wav or an mp3. The spreadshet is used to track projected hours for each store. Ideally we would like a cash register sound (green.wav) to play when the value is greater than 0, however the number is always greater than 0 as it counts down the hours, so unless there is a way to hide the value until all cells are completed?
What would probably be easier is to play a whammy sound of sort when the value is negative. I have it working, however it only works when my thumb drive is in the computer as th sound file is located there. So I need a file to point to the location of it on an embedded shet, maybe we can hide it?
I can't run any sort of script to temporarily put the file somewhere, as these are government computers....
Code:
<tbody>
</tbody>
What would probably be easier is to play a whammy sound of sort when the value is negative. I have it working, however it only works when my thumb drive is in the computer as th sound file is located there. So I need a file to point to the location of it on an embedded shet, maybe we can hide it?
I can't run any sort of script to temporarily put the file somewhere, as these are government computers....
Code:
Private Declare Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName As String, _ ByVal hModule As Long, ByVal dwFlags As Long) As Long Const SND_SYNC = &H0 Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 Private Sub Worksheet_Calculate() Const FName As String = "bad.wav" If Range("I2").Value > 22.2 Then Call PlaySound(FName, 0&, SND_ASYNC Or SND_FILENAME) End If End Sub |
<tbody>
</tbody>