How to Embed Video in Microsoft Excel

This article demonstrates the 3 ways that how to run a YouTube video from within Microsoft Excel. You may know of some other approached to this subject that is worth sharing. It’s a breeze to embed a video in Microsoft Excel.

video embed

  1. You can add an Active X control to the worksheet and add the video URL to the properties of the control.
  2. A Userform that is active from a button on the sheet is I think the best way to do this as it takes less space and cannot be accidentally deleted. This is for me the best approach normal.

Follow these two methods to embed video in Microsoft excel

When did you need to embed a video in Microsoft Excel?

  • As a training tutorial for the active file
  • To promote your business with the Excel file that you send
  • In place of and instruction list or how to list
  • To introduce yourself to your intended audience
  • To direct people to your website or YouTube channel

Here are the changes that are needed for the URL

  1. Link to video URL as it appears on ユーチューブ
    1. https://www.youtube.com/watch?v=U3TBBCZAdCs.
  2. Remove watch?    And replace   =    with   /
    1. Add this to the end of the URL ?fs=1&hl=en_US
  3. This is what it should look like when finished
    1. https://www.youtube.com/v/U3TBBCZAdCs?fs=1&hl=en_US
  • The first way to embed video in Microsoft Excel.

Active X control: Shockwave Flash Object

  1. On your worksheet, click on the 開発者 tab on the ribbon.
  2. If the Developer tab is not visible then go to File / Customise the Ribbon/on the right-hand pane tick the box next to Developer
  3. Click the 開発者 tab/in the control section, select Legacy Tools/Active X Controls/More Controls (The image is a crossed spanner and hammer)
  4. Scroll down until you can select Shockwave Flash Object
  5. Draw a box on the spreadsheet the size of the video (not too big).
  6. Right-click inside the box and choose Properties.
  7. In Movie add the URL for the YouTube video.
  8. In the URL delete Watch?  And change = to / and save the document.
  9. Click on Design Mode under the 開発者 tab to deselect design mode.
  10. Play your video.

Developer mode

  • The second way to embed video in Microsoft Excel.

YouTube Video in a Userform

  1. Press ALT + F11 to open the Visual Basic Editor
  2. Choose Insert/Userform
  3. Click View / Toolbox
  4. Right Click Toolbox / Additional Controls
  5. Scroll to Shockwave Flash Object and tick the box the object will now appear in the toolbox
  6. Click the Shockwave Flash Object icon that is now in the toolbox and draw a frame in the userform
  7. Right Click / Properties / Movie and insert the URL then remove? Watch and replace = with/in the URL
  8. On  the Toolbox, click Command Button add draw a Command Button under the Video Frame
  9. Double click the button and insert this code in the space between the 2 lines    unload me
  10. In the VBE menu Choose Insert  Module / in the module add this code Sub Open  then hit Enter
  11. In the procedure  (between () and End sub)add this code Userform1. Show(check Userform Name)
  12. Close the visual basic editor
  13. On the worksheet selected, the Insert tab then Shape and add a shape to the page
  14. Right-click the shape / Assign Macro / Select the macro Openme /  click OK

// Constants for DOM elements const dropdownTriggers = document.querySelectorAll('.dz-menu-item.dropdown'); const dropdownContent = document.querySelector('.dz-dropdown-content'); const dropdownPanels = document.querySelectorAll('.dz-dropdown-panel'); const header = document.querySelector('.dz-header-wrap');// State to track the currently open menu item element let activeDropdownElement = null; let closeTimer = null; // Timer for delayed closing// Function to close all dropdowns function closeAllDropdowns() { if (closeTimer) { clearTimeout(closeTimer); closeTimer = null; } // Only proceed if the elements exist if (dropdownContent) { dropdownContent.classList.remove('open'); } dropdownPanels.forEach(panel => panel.classList.remove('active')); dropdownTriggers.forEach(item => item.classList.remove('active')); activeDropdownElement = null; }// Function to open a specific dropdown function openDropdown(item, targetPanel) { if (closeTimer) { clearTimeout(closeTimer); closeTimer = null; } // 1. Close all others closeAllDropdowns(); // 2. Open the new one item.classList.add('active'); targetPanel.classList.add('active'); if (dropdownContent) { dropdownContent.classList.add('open'); } activeDropdownElement = item; }// Event listener for each dropdown menu item dropdownTriggers.forEach(item => { item.addEventListener('click', function(e) { e.preventDefault(); const panelName = this.getAttribute('data-panel'); const targetPanel = document.querySelector(`.${panelName}`); if (!targetPanel) return;const isCurrentlyActive = this === activeDropdownElement;if (isCurrentlyActive) { // If the same dropdown is clicked, close it immediately. closeAllDropdowns(); } else { // Open the new dropdown openDropdown(this, targetPanel); } }); });/* --- MOUSE EVENTS FOR STABILITY FIX --- */ if (header) { // 1. When the mouse leaves the entire header area (menu + dropdown bar), start a timer to close it. header.addEventListener('mouseleave', () => { // Only initiate close if a dropdown is currently active if (activeDropdownElement) { // Set a delay (e.g., 300ms) to allow the user to move the mouse slightly closeTimer = setTimeout(closeAllDropdowns, 300); } });// 2. If the mouse re-enters the header area before the timer fires, cancel the close. header.addEventListener('mouseenter', () => { if (closeTimer) { clearTimeout(closeTimer); closeTimer = null; } }); }// 3. Close when clicking anywhere outside the header (as a fallback) document.addEventListener('click', (e) => { // Check if header exists and if the click is outside the header AND a dropdown is open if (header && !header.contains(e.target) && activeDropdownElement) { closeAllDropdowns(); } });// Initial setup: ensure all are closed on load document.addEventListener('DOMContentLoaded', closeAllDropdowns); window.addEventListener('load', closeAllDropdowns);
上部へスクロール