playing wma files

B

Brettjg

I have my wav sounds playing quite nicely, using the following code. However,
one of the files I would to play is a wma file. Just changing the code below
to Fart.wma from Fart.wav doesn't do it. Does anyone have an idea on this
one? Regards, Brett

Option Explicit
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


Sub WAV_OOPS()
Dim WAVFile As String
WAVFile = "C:\QUO SOUNDS\Fart.wav"
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
End Sub
 
G

Gary''s Student

Sub playit()
ActiveWorkbook.FollowHyperlink Address:="C:\Documents and
Settings\Owner\Desktop\Sugar Magnolia.wma"
End Sub

Gets me a small piece of the Grateful Dead.
 
B

Brettjg

Thanks GS (again).Brett

Gary''s Student said:
Sub playit()
ActiveWorkbook.FollowHyperlink Address:="C:\Documents and
Settings\Owner\Desktop\Sugar Magnolia.wma"
End Sub

Gets me a small piece of the Grateful Dead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top