How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Suryanto Your Own Question
Suryanto, Programmer
Category: Programming
Satisfied Customers: 596
Experience:  Programmer, 9 years experience in VBA(Excel, Word, Outlook and Access) programming
Type Your Programming Question Here...
Suryanto is online now
A new question is answered every 9 seconds

Question: What is Function to play wav file in Excel 2010 VBA

Customer Question

Question: What is Function to play wav file in Excel 2010 VBA 7, operating under Windows 7, 64 bit?
Submitted: 2 years ago.
Category: Programming
Expert:  Suryanto replied 2 years ago.
Dear Customer,
Welcome to Justanswer.
I am Suryanto and I will assist you.
This is the sample macro
Looking forward to hearing from you
Thank you
Customer: replied 2 years ago.
I have paid you. I am not finding your code. Thank you. Palmer.
Expert:  Suryanto replied 2 years ago.
You can download the code here
or here is the code
Option Explicit
Option Base 1
Public Declare Function PlayWav _
Lib "winmm.dll" _
Alias "sndPlaySoundA" _
(ByVal cSoundFile As String, _
ByVal nFlags As Long) As Long
Public Sub Playsoundwav()
Dim SoundFile As String
SoundFile = "C:\Windows\Media\Chord.wav"
PlayWav SoundFile, 0
SoundFile = "C:\Windows\Media\Chimes.wav"
PlayWav SoundFile, 0
End Sub
If I have helped you with your issue, please rate my answer 3 STARS or more so I can get paid for my time
If my answer did not work, please let me know
Thank you