Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 295
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detecting the actual playing or NOT playing of a WAV file Bajbaj Excel Discussion (Misc queries) 0 October 24th 07 09:16 PM
Playing a sequence of WAV files robotman Excel Programming 6 May 26th 07 01:20 AM
playing mp3 files on user input Maxi[_2_] Excel Programming 4 August 17th 06 03:50 PM
Playing .mp3 files based on user input Maxi[_2_] Excel Programming 3 August 13th 06 03:29 PM
Playing .wav files (why do a few cause warning messages?) Cybert Excel Programming 0 October 19th 04 09:38 PM


All times are GMT +1. The time now is 06:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"