+ Reply to Thread
Results 1 to 11 of 11

Splash screen with video?

  1. #1
    Forum Contributor
    Join Date
    12-18-2013
    Location
    Kings Lynn, England
    MS-Off Ver
    Excel 2019
    Posts
    234

    Exclamation Splash screen with video?

    Hi all,
    has anyone tried adding a splashscreen to a file using a videoclip?
    Can you embed media player in a userform and auto run it?
    If anyone has an ideas or examples if they have done it before I would appreciate it please.

    Many thanks in advance.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Splash screen with video?

    Hi Johnny,

    The answer is yes and yes.

    There are prerequisites (explained in the attached file) that may be required in order to:
    a. Run Windows Media Player in a UserForm or a Spreadsheet
    b. Avoid a Nasty Message from Excel that indicates 'Windows Media Player' (which is an 'ActiveX' Control) may destroy the world

    It is not trivial to fix the 'Warning Messages' and changes to the Windows Registry may be involved.

    The attached .zip file contains:
    a. LJMWindowsMediaPlayerVideoMaster.xlsm - Excel file
    b. SampleThreeSecondVideo.mp4 - Sample 3 second video in .mp4 format
    c.SampleSixSecondVideo.mp4 - Sample 6 second video in .mp4 format


    The attached Excel file has been tested in 32 bit Excel 2016 on Windows 10. The file can:
    a. Run 'Windows Media Player' from the Spreadsheet
    b. Run 'Windows Media Player' from a UserForm
    c. Run 'Windows Media Player' Full Screen from a UserForm

    The file was tested with the attached .mp4 files only which must be in the same folder as the Excel File.

    There is code in Workbook_Open() to run 'Windows Media Player' when the file opens which is COMMENTED OUT because it is poor form to upload a file that automatically runs a Macro.

    Some typical code excerpt to run Windows Media Player:
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Forum Contributor
    Join Date
    12-18-2013
    Location
    Kings Lynn, England
    MS-Off Ver
    Excel 2019
    Posts
    234

    Re: Splash screen with video?

    Hi Lewis.
    Wow. thank you. Very detailed, and very informative.
    It will take me a little while to digest this, and I am sure I will have questions - but thank you so much for this. One initial question: the code looks for a filepath to the video files. Is there a way to embed the videofile within excel, then simply hide the worksheet it is embedded in?

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Splash screen with video?

    Is there a way to embed the videofile within excel, then simply hide the worksheet it is embedded in?
    There are many ways to do what you want in addition to the examples below. You can put the file name in the Spreadsheet or Hard Code the File Name in the Code.
    Please Login or Register  to view this content.
    The following tips may help you.

    To enable Macros and to Run Macros see the following:
    http://office.microsoft.com/en-us/ex...010031071.aspx
    http://office.microsoft.com/en-us/ex...010014113.aspx
    If help is still needed do a google search for 'youtube excel enable macro' and/or 'youtube excel run macro'.

    To access Visual Basic (VBA) see:
    http://www.ablebits.com/office-addin...a-macro-excel/
    a. Click on any cell in the Excel Spreadsheet (may not be needed).
    b. ALT-F11 to get to VBA.
    c. CTRL-R to get project explorer (if it isn't already showing).
    d. Double Click on a 'Module Name' in 'Project Explorer' to see code for that module.

    Debugger Secrets:
    a. Press 'F8' to single step (goes into subroutines and functions).
    b. Press SHIFT 'F8' to single step OVER subroutines and functions.
    c. Press CTRL 'F8' to stop at the line where the cursor is.
    d. 'Left Click' the margin to the left of a line to set (or clear) a BREAKPOINT.
    e. Press CTRL 'G' to open the IMMEDIATE WINDOW. 'debug.print' statements send their
    output to the IMMEDIATE WINDOW.
    f. Select View > Locals to see all variables while debugging.
    g. To automatically set a BREAKPOINT at a certain location put in the line:
    'Debug.Assert False'
    h. To conditionally set a BREAKPOINT at a certain location put in lines similar to:
    if i >= 20 and xTV20 > 99.56 then
    Debug.Assert False
    endif
    i. A variable value will be displayed by putting the cursor over the variable name.

    To manually set a breakpoint, see http://www.wiseowl.co.uk/blog/s196/breakpoints.htm

    Lewis

  5. #5
    Forum Contributor
    Join Date
    12-18-2013
    Location
    Kings Lynn, England
    MS-Off Ver
    Excel 2019
    Posts
    234

    Re: Splash screen with video?

    Many thanks for that.
    I have tried embedding the MP4 file, and I believe the only way is embed as an object, which I have done. However, using the last two lines of code above, I can name the sheet, but the object doesn't appear to have a range as an object. Is importing as an object the best way please?
    Many thanks in advance.

  6. #6
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Splash screen with video?

    Hi,

    Thanks for the rep points. Your original question and your need to embed the object both created an opportunity to work with things I haven't worked with previously. Thank you.

    Is there a way to embed the videofile within excel, then simply hide the worksheet it is embedded in?
    Take 2. I'm sorry I misunderstood the question.

    Yes, you are correct, you have to Embed an Object, which I was able to do successfully.

    The procedure is (in Excel 2016):

    To embed Video File see Method 2 in https://www.datanumen.com/blogs/2-ef...cel-worksheet/
    a. Insert > Object (Object is all the way to the right) > Create From File > Browse
    b. Select the File > Insert > Leave Both CheckBoxes UNCHECKED > OK
    c. Double Click the Object to play in the Default Application for that type of file.
    d. NOTE: After playing is completed, the Application remains OPEN.

    You don't have to put the embedded file in another Sheet. It can be hidden in plain sight and nobody will know it exists.

    The way the embedded file works is:
    a. You embed the file.
    b. Excel creates a temporary file in the Temporary work area (on my computer in C:\Users\Owner\AppData\Local\Temp\ ).
    c. When Excel closes the temporary file and (it's folder) are deleted by Excel.

    Thanks to code I was lucky enough to find, I was successful in accessing the temporary file and playing the video in Windows Media Player without the need for the External copy of Windows Media Player.

    I need several days to make what I did, ready for prime time. I will probably post an updated file with Embedded Video files sometime next week.

    Lewis

  7. #7
    Forum Contributor
    Join Date
    12-18-2013
    Location
    Kings Lynn, England
    MS-Off Ver
    Excel 2019
    Posts
    234

    Re: Splash screen with video?

    Many thanks.
    I look forward to it!

  8. #8
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Splash screen with video?

    Hi,

    All Done. See the Attached file which contains two embedded Video files that can be played either on a UserForm or in an Embedded Windows Media Player on the Spreadsheet. The .xlsm file is to big to upload so the .xlsm file is encased in the attached .zip file.

    Many thanks to Danial Chowdhury whose code at https://danny.fyi/embedding-and-acce...s-4d4e7863cfff
    was key to accessing Embedded Files.

    When an Excel file containing embedded 'ActiveX' Files is opened, temporary files are created by Excel C:\Users\Owner\AppData\Local\Temp\ on my computer containing the Embedded Files. The Embedded File Names are usually slightly different from the Original Names (e.g. 'abc.mp4' may become 'abc (2) .mp4')


    Important Notes:
    To embed a Video File see Method 2 in: https://www.datanumen.com/blogs/2-ef...cel-worksheet/
    a. Insert > Object (Object is all the way to the right) > Create From File > Browse
    b. Select the File > Insert > Leave Both CheckBoxes UNCHECKED > OK
    c. Double Click the Object to play in the Default Application for that type of file.
    d. NOTE: After playing is completed, the Application remains OPEN.

    A temporary file is created when the file is opened in C:\Users\Owner\AppData\Local\Temp\ on my computer
    The temporary file is Deleted when this file is closed.

    To Display or Hide 'ActiveX' Objects (or any Shape):
    a. Select any Object or Shape.
    If there are NO VISIBLE Shapes, type 'Selection Pane' in the Excel Search Window.
    b. Home > Shape Format (top right) > Selection Pane (top right)
    c. the Item Selected will be highlighted in the 'Selection Pane'.
    You can select another item and it will be highlighted.
    d. 'Left Click' the 'EYE Icon' to Hide/Display the Shape.
    e. You can 'Left Click' a 'Shape Name' twice to change the Name.
    NOTE: The Shapes displayed are for the 'Active Sheet' Only.


    To Delete 'ActiveX' Objects (or any Shape):
    a. 'Right Click' the Object (or any Shape) that is visible.
    b. Select 'Cut' to Delete that Shape.
    To Delete 'ActiveX' Objects (or any Shape):
    a. 'Right Click' the Object (or any Shape) that is visible.
    b. Select 'Cut' to Delete that Shape.

    The following is working code used to access Embedded 'ActiveX' files:
    Please Login or Register  to view this content.
    Lewis

    NOTE: Code was too large. Code from same Ordinary Code module included in the following post.
    Last edited by LJMetzger; 05-03-2020 at 12:30 PM.

  9. #9
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Splash screen with video?

    Code from previous post continued:


    Please Login or Register  to view this content.
    Lewis

  10. #10
    Forum Contributor
    Join Date
    12-18-2013
    Location
    Kings Lynn, England
    MS-Off Ver
    Excel 2019
    Posts
    234

    Re: Splash screen with video?

    Hi Lewis.
    Very informative. Thank you. I will need some time to digest this for sure. One initial question: When opening, the embedded file will not play. It states file not found - even though I can see it embedded.
    When clicking on the button copy embedded file, it returns the message could not find embedded file (again, I can see the two files embedded. I have tried manually adding the files to the desktop etc. but to no avail.
    Could you please advise where I have gone wrong?
    Many thanks.

  11. #11
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Splash screen with video?

    Hi,

    Could you please advise where I have gone wrong?
    Sorry for the problems you are having. We may be at a dead end.

    On my computers, when the Excel file is opened, each embedded file is stored in a temporary file on on my computer in the folder C:\Users\Owner\AppData\Local\Temp\
    In 32 bit Excel 2010 the temporary files are stored in that folder. In 32 bit Excel 2016 the temporary files are stored in a temporary subfolder in that folder.

    My speculation is that you did not do anything wrong. I see from your profile that you are using Excel 2019. Excel may handle temporary files in a different manner in Excel 2019, than in previous versions of Excel.

    Please download the attached file which started out as code that was in my most recent upload. I added diagnostic output to the code. Click the CommandButton on Sheet1 to run the Diagnostic Macro. Save the file, and Upload the file in this thread.

    That may help us find a solution. Sheet '200505.103958' is the output when run on my computer.

    Code folllows:
    Please Login or Register  to view this content.
    Lewis

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Video Splash screen???
    By Johnny247 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2014, 06:50 AM
  2. VBA Splash Screen
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2014, 12:25 PM
  3. Splash Screen
    By shollomon in forum Excel General
    Replies: 1
    Last Post: 11-28-2007, 05:37 PM
  4. Splash Screen
    By Paul Edwards in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2007, 08:06 PM
  5. Splash Screen off
    By gabch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2006, 05:45 AM
  6. Splash Screen
    By Bill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-03-2005, 01:30 PM
  7. splash screen
    By animated text in excel workshe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1