Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Media Player versus Windows Media Player

May I beg for advice from the collective wisdom?

Any advice gratefully received.

I was using media player (v6.4) as an object in a userform and I tried to
use the more advanced version of media player (WindowsMediaPlayer1) that
comes from the additional controls toolbox.

I dutifully replaced all theoccurences of MP with WindowsMediaPlayer1 in
the code, but the command "WindowsMediaPlayer1.Open (Mfile)" generates an
error whereas the command "MP.Open (Mfile)" didn't. Anyone know why?

Old code reads

Private Sub CommandButton1_Click()
Dim Mfile As String
Mfile = "c:\test.mpg"
MP.Open (Mfile)
End Sub

New code reads

Private Sub CommandButton1_Click()
Dim Mfile As String
Mfile = "c:\test.mpg"
WindowsMediaPlayer1.Open (Mfile)
End Sub


  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Media Player versus Windows Media Player

I don't know, but we are now on windows media player 10

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Media Player versus Windows Media Player


Hello

you may try


Private Sub CommandButton1_Click()
WindowsMediaPlayer1.URL = "C:\myMusic.mp3"
WindowsMediaPlayer1.Controls.Play
End Sub


Regards ,
michel


--
michelxld
------------------------------------------------------------------------
michelxld's Profile: http://www.excelforum.com/member.php...o&userid=17367
View this thread: http://www.excelforum.com/showthread...hreadid=476029

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Media Player versus Windows Media Player


"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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Media Player versus Windows Media Player


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's Profile: http://www.excelforum.com/member.php...o&userid=17367
View this thread: http://www.excelforum.com/showthread...hreadid=476029



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Media Player versus Windows Media Player


"michelxld" wrote
in message ...

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


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Media Player versus Windows Media Player

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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
windows media player commands teepee[_3_] Excel Discussion (Misc queries) 5 November 1st 08 11:58 PM
Close Windows Media Player Cordell Excel Discussion (Misc queries) 1 January 30th 07 04:43 AM
Force asx to bring up Windows Media Player - How? chaser7016 Excel Discussion (Misc queries) 1 January 23rd 07 01:09 PM
Media Player versus Windows Media Player teepee Excel Discussion (Misc queries) 1 October 14th 05 02:25 AM
Excel windows media player links JohnNews Excel Programming 1 October 8th 04 03:23 PM


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"