Results 1 to 9 of 9

Thread: How to insert an animated gif in Excel

  1. #1
    Join Date
    Oct 2008
    Posts
    89

    How to insert an animated gif in Excel

    To insert an animated gif image in an Excel workbook, the reflex is to insert the menu / image, but it does not work. This is normal because the animation is done by multiple images and importation is limited to the first.

    To make the animation work, you must insert the image into a control.

    • To insert the control, go to the View menu / Toolbars / Control Toolbox
    • Activate the first button "creation mode"
    • Choose the last button (the one with a hammer), then choose "Microsoft Web Browser"
    • Then draw a frame for the image.
    • Disable the first button "design mode" and the toolbar.
    • Finally, in the VBA editor and in the window of the leaf concerned paste the following code:

      Private Sub Worksheet_Activate ()
      WebBrowser1.Navigate "X: \ path of the image. GIF"
      End Sub
    • Change the active page of the workbook, and then return to the worksheet to see the animation moving image.
    • To add other events, we must proceed in the same way each time adding a line to the code above, taking into account the control number assigned.
      WebBrowser 2. Navigate "X: \ path of the image. GIF"
    • To insert other animations on other pages, you must do the same by adding the VBA procedure on each page.

  2. #2
    Join Date
    Oct 2008
    Posts
    89

    Re: How to insert an animated gif in Excel

    If the size does not fit the image, it must be corrected:

    • View menu / Toolbars / Control Toolbox
    • We must activate the first button "creation mode"
    • Resize the frame and the parameters.
    • Disable the first button "design mode" and the toolbar.

  3. #3
    Join Date
    Aug 2008
    Posts
    103

    Re: How to insert an animated gif in Excel

    Add a new slide that can contain an image. Select the option “Insert image”. -> Insert the GIF file format.

    The GIF will be animated only if the if it is an animated GIF loop and not an animated gif set to run once.

  4. #4
    Join Date
    Jul 2009
    Posts
    4

    Re: How to insert an animated gif in Excel

    I can't seem to get this to work for me.

    I'm trying to insert a small blinking gif file into my spreadsheet. I've tried follwing these instructions over a dozen times but I'm not sure what I'm doing wrong. When you say, "in the window of the leaf concerned" do you mean the formula bar of the cell that holds the control box?

    Here's the text I'm using in case someone sees an obvious mistake:

    Private Sub Worksheet_Activate()
    WebBrowser1.Navigate "H: \GIF1.GIF"
    End Sub


    Would it be possible to post a small folder containing a generic gif and an excel file with this gif inserted into it.

  5. #5
    Join Date
    Apr 2008
    Posts
    392

    Re: How to insert an animated gif in Excel

    Quote Originally Posted by misterree View Post
    Would it be possible to post a small folder containing a generic gif and an excel file with this gif inserted into it.
    You can try that. The image must be in the same folder or full path must be given...

  6. #6
    Join Date
    Jul 2009
    Posts
    4

    Re: How to insert an animated gif in Excel

    I was thinking more along the lines of one of you guys posting an excel file with a gif added. Something you could throw on the C: drive and have work.

  7. #7
    Join Date
    Jul 2009
    Posts
    4

    Re: How to insert an animated gif in Excel

    Can anyone point to an example xls file that has an animated gif in it?

  8. #8
    Join Date
    Nov 2008
    Posts
    20

    Re: How to insert an animated gif in Excel

    Following will be the step by step process to insert the animated gif in the Excel file, and for that you need to first go to the control, go to the View menu/Toolbars/Control Toolbox. Then go to Design mode, Choose the last button (it will be displayed as a hammer), then select Microsoft Web Browser.

    For more information please look at the following forum discussion:

    Inserting an gif file in Excel

  9. #9
    Join Date
    Jul 2009
    Posts
    4

    Re: How to insert an animated gif in Excel

    I've tried following those instruction a dozen times now but they aren't working for me. I load control mode, build a web window, close control mode then do the VBE stuff but it's not working.

    This is why I'm trying to find an excel file with a gif so I can see if I'm missing something.

Similar Threads

  1. How to insert pictures into Excel automatically ?
    By Metaldigger in forum Software Development
    Replies: 7
    Last Post: 10-03-2010, 12:32 AM
  2. How to insert last date in excel 2010
    By Calum in forum Windows Software
    Replies: 5
    Last Post: 18-02-2010, 12:07 AM
  3. Insert Excel data into Word
    By Rivita in forum Windows Software
    Replies: 2
    Last Post: 24-09-2009, 02:09 PM
  4. Insert a Tab character in Excel
    By Chhaya in forum Windows Software
    Replies: 2
    Last Post: 06-06-2009, 10:03 PM
  5. Can't insert cells in Excel
    By Xavier1234 in forum Windows Software
    Replies: 3
    Last Post: 06-06-2009, 07:46 PM

Tags for this Thread

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
  •  
Page generated in 1,710,830,122.31991 seconds with 16 queries