Hello
you may try
Private Sub CommandButton1_Click()
WindowsMediaPlayer1.URL = "C:\myMusic.mp3"
WindowsMediaPlayer1.Controls.Play
End Sub
Regards ,
michel
Hello
you may try
Private Sub CommandButton1_Click()
WindowsMediaPlayer1.URL = "C:\myMusic.mp3"
WindowsMediaPlayer1.Controls.Play
End Sub
Regards ,
michel
"michelxld" wrote
> you may try
>
>
> Private Sub CommandButton1_Click()
> WindowsMediaPlayer1.URL = "C:\myMusic.mp3"
> WindowsMediaPlayer1.Controls.Play
> End Sub
Many thanks. That worked a treat. My only problem is that another command
in the script "MP.Duration" cannot be translated into
"WindowsMediaPlayer1.Controls.Duration" Other than that glitch, I'm most
grateful to you.
tp
Hello
try this macro
WindowsMediaPlayer1.currentMedia.duration
or
Dim ValMin As Double, ValSec As Double, S As Double
S = WindowsMediaPlayer1.currentMedia.duration
ValMin = Application.WorksheetFunction.RoundDown((S / 60), 0)
ValSec = Application.WorksheetFunction.RoundDown(S, 0) - (ValMin * 60)
MsgBox Format(ValMin, "00") & ":" & Format(ValSec, "00")
regards ,
michel
"michelxld" <michelxld.1wvu6d_1129277112.9861@excelforum-nospam.com> wrote
in message news:michelxld.1wvu6d_1129277112.9861@excelforum-nospam.com...
>
> Hello
>
> try this macro
>
> WindowsMediaPlayer1.currentMedia.duration
>
> or
>
> Dim ValMin As Double, ValSec As Double, S As Double
> S = WindowsMediaPlayer1.currentMedia.duration
> ValMin = Application.WorksheetFunction.RoundDown((S / 60), 0)
> ValSec = Application.WorksheetFunction.RoundDown(S, 0) - (ValMin * 60)
> MsgBox Format(ValMin, "00") & ":" & Format(ValSec, "00")
Thank you. I will try it and let you know how it went
tp
Thanks. That also worked.
Last one...
Private Sub MP_PositionChange(ByVal oldPosition As Double, ByVal newPosition
As Double)
Application.Cells(1, 1) = newPosition
End Sub
Needs to go to WindowsMediaPlayer. And need to reference worksheet sheet
'results' rather than the same sheet.
Any idea?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks