# Off Topic > Tips and Tutorials >  >  Embed YouTube video into an Excel spreadsheet

## excelblogger

This is something I have started to use a lot when I have my Excel courses or in my class when I teach Excel to students at my business school.
I embed YouTube-videos into the excel spreadsheet. This makes it possible for the user of the spreadsheet to watch the video at the same time as he/she is working in the Excel sheet.

The participants at my courses love it! After two days of “cramming” they have all or exercises in 5 to 10 minutes video clips to bring embedded in the exercise workbooks.

For my students the get video recorded Excel solutions to advanced prpoblems.
OK, this is how you do it:

1. You insert a Shockwave Flash Object in an Excel spreadsheet (Developer ->Insert-> More controls)

2. In the properties for that object you add an address to you YouTube-movie.

3- You need to do some small changes to the YouTube address (Delete the watch? And replace = with a /). Eg: making: 

http://www.youtube.com/v/bvgttKEIhFc&feature=relmfu
    out of
http://www.youtube.com/watch?v=bvgtt...feature=relmfu

After that you have an emedded youtube video in your Excel spread sheet.

If you want more details, you can read my blog post on this, where I also have a video demonstrating everything step by step…

You find it here:
http://excelblogger.com/embed-youtub...l-spreadsheet/

Regards
Anders

excelblogger.com

----------


## limewire

This is fantastic!!

I have 2 questions for you, to polish this up for my needs  :Wink: 

1. How can you stop the video? Or prevent the video from further loading in the background when pause is pressed?

2. How can you start the video at a specific time? I have tried the *http://www.youtube.com/v/123456ens&f...tailpage#t=11s*  method, but it still starts from the beggining. On the same note, not only is it possible to start from a certain time, but can you stop the video automatically at a certain time? ie have a range to play from?

----------


## excelblogger

Thanks for positive feedback,

I understand what you are looking for, and I would like to do it myself 

I have only manage to make the video start after a certain part of the video by adding &start=100 after the address.
e.g. this code will make the video start after 100 seconds:

http://www.youtube.com/v/bZzN1LGeAc8&start=100

But I havent manage to add an &end code that works.

An alternative solution might to tweak the code from places such as http://www.tubechop.com/ that helps you cut out pieces from youtube-movies. But I havent managed to figure it out how to do that. If you manage, please let me know.

Maybe there is a possibility to change other parts of the Shockwave Flash Object properties to make it work better. But thats beyond my present knowledge

I have no solution to the further loading problem.. yet

With the hope that someone else can solve the problem

/ excelblogger.com

http://excelblogger.com/embed-youtub...l-spreadsheet/

----------


## WorldBridge

This is excellent and exactly what I've been looking for to do instructions for use on a file I've created.

Is it possible to embed the video in a userform etc so the user can perform actions on different tabs file while the video is playing?

----------


## abousetta

You can easily accomplish this with a web browser embedded in the userform.

abousetta

----------


## jdlc

this amazing abousetta! thanks

----------


## abousetta

Glad you liked it. Some people have done some amazing things with the web browser in a userform including showing images, different cell contents, etc. (especially when used with Excel's camera feature).

Good luck.

abousetta

----------


## WorldBridge

Thanks a ton abousetta!  That is exactly what I needed.  

I know I can copy and paste the userform you created in the file but could you describe briefly how to do this myself?
Or point me in the right direction?

----------


## abousetta

It is as simple as adding anything to a userform (e.g. textbox, picture, etc.). Right click in the userform's toolbox (the popup menu that has all the objects you can add to a userform) >> additional controls >> Microsoft Web Browser. A small little globe icon will appear along with all the standard objects you can use. Just click on it and use it as you would any other object. The most basic command as you can see from my example is to navigate to a site, but you can also set up buttons to send you to the default home page on IE, back, etc. as you would in IE.

abousetta

----------


## WorldBridge

I don't see 'additional controls' in the userform's toolbox...

I can see it in the Excel ribbon Developer >> Controls >> Insert 
but where can I find it in Visual Basic?  Is it missing because I have 2007?

----------


## abousetta

The 'additional controls' option only appear when your right click in the empty space in the toolbox (not the ribbon).

abousetta

----------


## WorldBridge

AHA! Thanks a ton!

Now I have one last problem and let me know id I need to start a new thread for this:
I want this userform to be visible while allowing the user to perform actions like click buttons, change sheets, and run macros.

Can the video userform be run on a different thread or am I thinking too much like Java?

----------


## abousetta

Here's an example showing two userforms that will pop up and each will not interfere with the other nor will they interfere with work on the worksheets. The secret is using DoEvents to pause the looping code and to load the userforms as vbmodeless (default is mode).

abousetta

----------


## WorldBridge

Perfect.  I can now take over the world! MUAHAHAHAHA

Thank you, you're help has been exceptional.

Out of curiosity: what does modeless vs mode do?

----------


## abousetta

If the userform is mode then it will be like a msgbox. You can't do anything in Excel or any other userform while the original userform (mode) is visible. Modeless allows you to interact with other Excel objects (e.g. worksheet) while the userform is loaded and visible.

Hope this helps.

abousetta

----------

