View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default How run mp3 audio files in vba

Assuming you have the FULL path and name typed into cells. Simply select the
cells desired and fire it.

Sub playselectedfiles()
For Each song In Selection
'MsgBox song
'ActiveWorkbook.FollowHyperlink Address:=FullFileName
ActiveWorkbook.FollowHyperlink Address:=song
Next song
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"franco2808" wrote in message
...
May I take advantage of your kindness?
I have to link more audio files and so I want they to be played one after
another.
How can I wait for the end of an audio file playing?

"Don Guillett" wrote:

glad to help

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"franco2808" wrote in message
...
Wonderful. You are great.
Now it works well.
Thank you very much, Don Guillett.

"Don Guillett" wrote:


I just tested fine
fileaudio = "C:/audiomumbay/prova.mp3"
try change to
fileaudio = "C:\audiomumbay\prova.mp3"


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"franco2808" wrote in message
...
Thanks very much Don Guillett for your help, but I need more help.
I tried this macro:

Sub pippo()
Dim fileaudio As String

fileaudio = "C:/audiomumbay/prova.mp3"
ActiveWorkbook.FollowHyperlink Address:=fileaudio

End Sub

and it does not work.

If I change the type of file:

Sub pippo()
Dim fileaudio As String

fileaudio = "C:/audiomumbay/prova.wav"
ActiveWorkbook.FollowHyperlink Address:=fileaudio

End Sub

of course with a wav file, it works well.
Maybe I have problems because I have Excel 2000?

"Don Guillett" wrote:

Put this in a double_cllick macro where you doubleclick on the
typed
in
PATH
and name of the file
C:\A_D\TownesVanZandt\Townes Van Zandt - Drunken rahayes.mp3


ActiveWorkbook.FollowHyperlink Address:=FullFileName

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"franco2808" wrote in
message
...
In office, eg excel, you can write a macro to run wav audio
files.
Can
you
do
the same for mp3 files?