How do I use VBA to play sound clip from website?

  • Thread starter Thread starter MikeZz
  • Start date Start date
M

MikeZz

Hi,
I found the instructions on how to play a wav file from my hard drive but
have a new challenge.

I'm curious how I can play a sound from a popular sound-clip website from
within VBA.


Thanks,
MikeZz
 
The short answer is that you can't. The longer answer is that you
can't in VBA because you'd have to use a stream, which isn't supported
in VBA. You can do it in NET, but not VBA.

You could, perhaps, download the file (assuming you have a URL that
points to a file, not a streaming object) to the hard drive and then
play the sound from the local drive.

See http://www.cpearson.com/excel/DownloadFile.aspx for VBA code to
download a file from a URL.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Back
Top