See if it help

Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal
lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As
String) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
Example :-
Sub GetFile()
call mciExecute ("play c:\a.MDI" )
Call PlaySound("c:\a.wav", 0&, SND_ASYNC Or SND_FILENAME)
End Sub
Sub StopMIDI()
mciExecute ("stop c:\a.MDI")
End Sub



-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of bpascal123
Sent: Friday, July 01, 2011 5:07 AM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ play sound

Hi,

I'd like to know if it's possible in an Excel workbook to play a sound
when a cell's value has a condition in it while working. like :

if (A1<>0;play sound;mute)

I'm wondering this because from what I know, Excel code is running on
a user event. That woud mean, the time I'm working and the value is
set to mute, the code is in "sleep mode"...

Thanks if you can help me and show me I'm wrong.
 :)

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to [email protected]

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to [email protected]

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to