• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

insert gif images in excel 2013

hoomantt

Member
Hi Professors;

i have a question:

how can i insert a gif image(an animated image) into a sheet of a workbook?

please help me,please.

thanks alot.
 
hi,

when i insert a microsoft web browser in a worksheet an erroe shows:

that error is :

can not insert object.

what should i do ? please!!!
 
Hi Hoomantt


You can pick up an example here;


http://www.vbaexpress.com/kb/getarticle.php?kb_id=19


It is the No.3 item on a basic Google search for the Rocket Scientist Inspired search term - "Excel animate userform" :)


Make sure you save all the files in the same directory or it won't work.


Take care


Smallman
 
Hi, hoomantt!

You may want to use the Object Browser which handles animated gifs easily .

Regards!
 
hi Smallman;

if i want to use a gif image in an userform without exist a folder like you make,how can i do?

is there any way.

is there any way to attach the gif file to this workbook instead of a folder?

thanks
 
Hi, hoomantt!


Give a look at this file:

https://dl.dropboxusercontent.com/u/60558749/insert%20gif%20images%20in%20excel%202013%20%28for%20hoomantt%20at%20chandoo.org%29.xlsm


In 1st worksheet it has a simple ActiveX image control loaded with an animated gif but it's display as a static image. Aside you'll find an Object Browser control loaded with the same animated gif where it has movement. The only user form will be automatically displayed repetating the process of the browser control.


You may find the code for these two at the ThisWorkbook class module in the code for the workbook open procedure and at the user form code section in the code for the user form initialize event:

-----

[pre]
Code:
Private Sub XXX_EventYYY()
With WebBrowser1
.Navigate ZZZ
DoEvents
End With
End Sub
[/pre]
-----

where XXX is the related object (Workbook or UserForm)m, YYY is the event name (Open or Initialize) and ZZZ is the full path to the animated gif file.


Just advise if any issue.


Regards!
 
hi dear sirjb7

i am so stupid in this events and dont understand your teach to me,

you are a good teacher but i am stupid,and i will ask you please please please help me with a good uploaded file and i research on it and understand,

my knowledge about vb is very little and i am a bad student for you

please forgive me and if you want please,please please help me ....

thanks alot man!!!!!!!!!!!!

thanks
 
Hi, hoomantt!


First of all remember Albert Einstein quote: "We are all very ignorant, what happens is that not all ignore the same things".


Now reading your 1st post, here are a few considerations:

a) It can't be done with formulas, so VBA is required.

b) There's no native Excel image control that handles animated GIF files, so you should use either one of these methods:

b1) From the VBA editor, Tools, References, select Microsoft Internet Tools.

b2) From the worksheet, include a Microsoft Object Browser object from the Programmer tab, Controls group, Insert icon menu, ActiveX controls, More Controls icon, and then browsing thru the list until Microsoft Web Browser.


Does this help as a starting point?


Regards!
 
Back
Top