![]() |
#1
|
|||
|
|||
![]()
This is the code I'm trying to use but I'm getting nothing. I'd prefer to set the path to
C:\Users\X\Music\WWE\ Basically whenever M2>0 I'd like the wav file to play. (This is set in Sheet Tab- View Code Declarations) 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 (This part was in a combined PlayWav) Sub PlayWAV() WavFile = ThisWorkbook.Path & "\BoDallasA.wav" Call PlaySound(WavFile, 0&, SND_ASYNC Or SND_FILENAME) End Sub Private Sub Worksheet_Change(ByVal Target As Range) Threshold = 0 If Range("M2").Value > Threshold Then PlayWAV End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Insert a text conditionally | deboer | Word | 1 | 05-04-2014 03:35 PM |
![]() |
newton.rogers | Excel | 1 | 03-18-2014 12:57 PM |
![]() |
g4tv4life | Excel | 2 | 03-13-2014 10:58 AM |
Macro to conditionally create or go to worksheet | Reinaldo123 | Excel Programming | 1 | 07-06-2012 07:23 AM |
PPT not playing full music file | gprcinstructor | PowerPoint | 1 | 09-15-2010 11:08 PM |