Inserting an animated gif in Excel
To insert an animated gif image in an Excel spreadsheet, you must insert the image into a control.
To insert the control, go to the View menu
/Toolbars/Control Toolbox
Activate the first button
Design mode
Choose the last button (the one with a hammer), then select
Microsoft Web Browser .
Then draw a frame to receive the image.
Disable the first button
Design mode and the toolbar.
Finally, in the VBA editor and in the window of the paper concerned paste the following code:
Private Sub Worksheet_Activate()
WebBrowser1.Navigate "X:\complete path image.GIF"
End Sub
Change the active page of the spreadsheet, and then eturn on the page containing the animation, to see the if it working.
To add other events, we must proceed in the same way each time adding a line to the above code, taking into account the control number assigned.
WebBrowser2.Navigate "X:\complete path image.GIF"
To add other events on other pages, you must do the same by adding the VBA procedure on each page.
If the size does not fit the image, it must be corrected:
View/Toolbars/ Control Toolbox
You must first activate the button
Design mode
Resize the frame and the parameters.
Disable the first button
Design mode and the toolbar.