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

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
 
C

Chip Pearson

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)
 

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

Top