You can do this in two ways:
<ol>
You add the Media Components and then pass the file name to the component
You perform a <i>shell</i> command that will open <i>Windows Media Player</i> and passing the file path and name as argument
</ol>
Example
<pre>
Private Sub Command1_Click()
Dim path As String
Dim runExe As Double
path = “C:\Program files\Windows Media Player\wmplayer.exe”
runExe = Shell(path & ” c:\mymusic\file.mp3″, vbMaximizedFocus)
End Sub
</pre>
Discuss This Question: