VBA User Forms videos | Excel VBA Forms Pt 16 - Playing YouTube Videos

Posted by Andrew Gould on 04 April 2016

Playing videos in a VBA user form is perhaps a little frivolous but it makes for a fun video! You'll learn how to add extra controls to the toolbox, how to use the Shockwave Flash Object and a little about how to use VBA's string functions to manipulate YouTube's video URLs.

See our full range of VBA training resources, or test your knowledge of VBA with one of our VBA skills assessment tests.

This video has the following accompanying files:

File name Type Description
Profitable Films - Pt16 Playing YouTube Videos.xlsm Excel workbook with macros

Click to download a zipped copy of the above files.

There are no exercises for this video.

Making a  video bigger

You can increase the size of your video to make it fill the screen like this:

View full screen

Play your video (the icons shown won't appear until you do), then click on the full screen icon which appears as shown at its bottom right-hand corner.


When you've finished viewing a video in full screen mode, just press the Esc key to return to normal view.

Improving the quality of a video

To improve the quality of a video, first click on the Settings icon:

Settings icon

Make sure you're playing your video so that the icons shown appear, then click on this gear icon at the bottom right-hand corner.


Choose to change the video quality:

Video quality

Click on Quality as shown to bring up the submenu.


The higher the number you choose, the better will be your video quality (but the slower the connection speed):

Connection speed

Don't choose the HD option unless you have a fast enough connection speed to support it!


Is your Wise Owl speaking too slowly (or too quickly)?  You can also use the Settings menu above to change your playback speed.

This page has 3 threads Add post
10 Sep 21 at 13:13

First of all I just want to say:


Thank you so much for the informative videos on your website. I have learned so much about VBA coding although there is still a lot to learn. It comes with time.


I'm currently working on your User Forms and Video 16 - Playing YouTube Videos.


Unfortunately, Adobe discounted their Flash Player and I quote:


"Adobe Flash Player EOL General Information Page


Since Adobe no longer supports Flash Player after December 31, 2020 and blocked Flash content from running in Flash Player beginning January 12, 2021, Adobe strongly recommends all users immediately uninstall Flash Player to help protect their systems.



Is there any other FlashPlayer I can use to make my video trailers work?

10 Sep 21 at 13:23

Hi Elize,

Sorry but I don't know of an alternative Flash player control. You could use the Web Browser form control to navigate to the video player control on YouTube and play it from there. It's not an ideal solution unfortunately.

18 Jun 21 at 13:51

Shockwave Flash Player control is no longer supported.Can you show another method so that we can play youtube videos in our excel vba userform??

13 Sep 21 at 13:09

Good day!

Thank you Andrew for your answer to my Flash Player question.

I'm going to give it a try. Just hope I get it right.




18 Jun 21 at 16:01

Hi there. I don't know of a direct replacement for this to stream a video directly from YouTube.

You can use the Media Player form control to play local video files https://docs.microsoft.com/en-us/windows/win32/wmp/windows-media-player-sdk

You could also use the Web Browser control to navigate to the video player control on YouTube.

Neither are really good solutions but they're the only ones I know of!

18 Jun 21 at 16:47

Thank you...

I really want to say that your videos are really good...i have downloaded all your videos and i have learnt many things from your videos...You are one of my best teacher....??

Andrew G  
19 Jun 21 at 06:44

Thank you! I'm happy to hear that you've found the videos useful.

07 Feb 20 at 13:57

Hi Andrew

It seems that the video " Playing Youtube Videos " is not complete. There is not the multipage. 
Also when I try to add the ShockWave Flash Object it appeared an error " Access Denied" .

13 Feb 20 at 08:53

Hi JD,

It seems that you're correct. I'm not entirely certain of the cause although I suspect it's due to some older controls related to the Shockwave Flash Player becoming obsolete.  You can download a file with the multipage control from the previous video although I don't think that it will help with the Flash Player unfortunately!