Watch Movies In a Spreadsheet

December 30th, 2004 | Categories: Misc | Tags:
-->

windowsmediaplayterWatch or listen to movies in Excel, while you work in Excel:

1. On the main menu click Insert->Object
2. Select Windows Media Player from the Object Type box and hit OK
3. Move and resize the WMP to your liking

Note: If you can’t resize the WMP object, switch to “Design Mode” by clicking the design mode button designmode

Now we’ll add some code to tell the Windows Media Player object to Play and what file to play. Open the Visual Basic Editor(alt+F11), double click the worksheet that contains the WMP you just inserted and Paste the following code:

Sub PlayMovie()
'URL is the location of the movie - change appropriately
WindowsMediaPlayer1.URL = "C:/rb.wmv"
WindowsMediaPlayer1.Controls.Play
End Sub

Play the movie just as you would run a Macro: Tools->Macro->Macros

You may also want to create a couple of shortcuts to Hide and Stop playing the Movie if the boss approaches. Add the following code below the previous code:

Sub HideQuick()
WindowsMediaPlayer1.Visible = False
WindowsMediaPlayer1.Controls.pause
End Sub

Sub ShowQuick()
WindowsMediaPlayer1.Visible = True
WindowsMediaPlayer1.Controls.Play
End Sub

Next add shortcuts to the 2 macros (Tools->Macro->Macros->Options) and you have an instant ON/OFF switch at your fingertips.

bmmovieSideNote: While watching a movie directly in Excel is interesting, my favorite way to watch a movie while working is using the stand alone Media Player with a few different options set.

From the Tools->Options menu check the box “Display On Top when in Skin Mode”. From the View menu select “Skin Mode” (a small skin works best). Move your movie to the bottom right or left of your screen.

With this setup I can work and also switch between apps and always have my movie visible, yet out of the way. Thanks to Kingzter.

Can't get the tutorial to work for you? Need help with your code?
Get answers right away at our AE Excel Support Forums!
  1. December 31st, 2004 at 05:20
    Reply | Quote | #1

    i never manager to get this control to work properly from userforms, couldn’t get it to move one fame at a time.
    Are there any alternatives any one know of?

  2. Mark
    January 2nd, 2005 at 17:28
    Reply | Quote | #2

    Ross, I’m not sure of any alternatives.

    On a similar note; Currently I’m experimenting with displaying simple flash in a form, I’ll post when I get it.

  3. January 4th, 2005 at 03:41
    Reply | Quote | #3

    dug this out from my bookmarks:
    http://rookscape.com/vbgaming/tutBZ.php

    when i was looking at this i did try this, but it came up with the window media player, not as i had excpected some other control. So it gave the same problems:

    what are you using for flash “shockwaver flash object”?

  4. Mark
    January 4th, 2005 at 13:16
    Reply | Quote | #4

    Thanks for the link.

    Add a reference to “shockwave flash” to play flash files. I download practice flashes from the movies section of flashkit.

  5. January 16th, 2005 at 14:58
    Reply | Quote | #5

    Brilliantly simple; pasted object onto spread sheet. Used it to check mp3 lists for duplicates. Thanks very very much!!!

    PS:How do I pause and restart at the pause point. I suspect a ‘bookmarking’ system but the object browser doesn’t help much. On the same note, I can fast forward but I cannot play at a chosen point.