playing wma files
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 |
playing wma files
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. -- Gary''s Student - gsnu200836 "Brettjg" wrote: 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 |
playing wma files
Thanks GS (again).Brett
"Gary''s Student" wrote: 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. -- Gary''s Student - gsnu200836 "Brettjg" wrote: 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 |
All times are GMT +1. The time now is 01:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com