Music sample attached to worksheet

  • Thread starter Thread starter Bill Lawrence
  • Start date Start date
B

Bill Lawrence

Can somebody pleae tell me how I can link to a piece of
music either on my PC or on the net via a button on a
simple worksheet. (As you click on the button the music
plays).
Thanks very much
Bill
 
This will play an .mp3 on your harddisk from a doubleclick event on the
worksheet module. I am using WMP.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
ActiveWorkbook.FollowHyperlink Address:= _
"C:\yourfolder\" & ActiveCell & ".mp3"
End Sub
 
Don,
I get a compile error and a nmessage that the spcified
file cannot be opened.
Also the middle two line are highlighted yellow.
I'd love to use this macro too, please advise!
TIA
 
tested in xl97 & xl2002 using WMP

Ok, suppose you want to play
C:\yourfolder\Willie Nelson - Highwayman.mp3

Assuming you had

Willie Nelson - Highwayman

typed in a cell and the macro provided was in the SHEET module, just
double click to play
 
Hi Don,
I am obviously missing something, the following is
highlighted yellow after debug is clicked. My error
message states:Run time error '-2147221014
(8004001ea)'Cannot open the specified file.

andActiveWorkbook.FollowHyperlink Address:= _
"C:\Documents and Settings\myname.MYPLACE01\My
Documents\My Files\Music\SteelMinor.mp3" & ActiveCell
& ".mp3"

is in yellow.

Any help appreciated.
 
Back
Top