Mp3 input

Wil Moosa

Well-known Member
Joined
Aug 11, 2002
Messages
893
I’m desperately, desperately seeking for an answer on this one.

I have a userform with a X-control media player. I know that I can use the properties to define the mp3 input. I need to know if it is possible to define the input differently. I like to refer to the active cell (where the full path can be found).

Ivan came up with the following but that does not work.

Sub PlayPlayer1()
MediaPlayer1.Open "D:\Audio\MP3_Pop\Al Stewart - On the border.mp3"
End sub

I scavenged the web for information on this a few nights but correct me if I'm wrong but I find the userform info on the media player very poorly documented.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Give something like this a try:

Private Sub UserForm_Activate()
WindowsMediaPlayer1.URL = "file://" & ActiveCell.Text
End Sub
 
Upvote 0
(translated) Error message is: "Windows Media Player can not play the file as the given protocol is not supported. Try to open the file in the dialog window "open URL" with another transport protocol (e.g. http, rts") ".
 
Upvote 0
What version of Windows Media Player are you running?

I tested my code with Windows Media Player 9, XL2002 running on Windows 2000 Pro.
 
Upvote 0
Hotpepper, I fiddled a bit with your code and suddenly realised that your composition of the path was didfferent from mine. The code that worked fine finally was WindowsMediaPlayer1.URL = ActiveCell.Value

When using WindowsMediaPlayer1.URL for searching the web... plenty of additional information turned up. I learned there that the coding for the several versions of the player is different (after version 9?).

Thanks for the help with this one.
 
Upvote 0
I don't know if this will help, but it didn't seem to care if it had the file:// part or not:

Code:
Private Sub UserForm_Activate()
WindowsMediaPlayer1.URL = ActiveCell.Text
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top