Dynamically Updating Image (ActiveX Image Control?)

VTHokie11

New Member
Joined
Oct 26, 2011
Messages
19
Hello thank you for looking at this thread! My workbook simply has multiple columns of data which will be summarized visually in a tag cloud (I have the tag cloud part taken care of already creating either a jpg or png, I simply have to change the extension within a batch file to change between picture formats)

I need to have the tag cloud image display and update depending on which column the user would like to summarize (for now I have simplified the issue by only having one of the data columns in my workbook, and will worry about the user selection of the data column to be summarized later).

My Main Question:

Focusing on the image display and updating now, whether it be an ActiveX Image Control or any other way (open to any ideas advice). I've been playing around manually before I try and code it and I can not get either a jpg or png file to attach to the ActiveX control (both of which cause an Invalid Picture Message).

The file name can stay the same if need be and for now I think/assume that'd be easiest (I have my Tag cloud generator just replacing the previously existing image file of the same name).

Would ActiveX control be the way to go for this dynamically changing image? If not how would you recommend I try and tackle this. Please let me know if I've not been clear and much thanks in advance!:)
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hmmmm I dont know where I'm not being clear, apologies if you didn't follow.

Basically the only thing I'm asking about is I have a image file, the wordcloud that that picture file is a picture of changes and gets replaced by a new picture of the same file name when the user summarizes a different column of qualitative data.

I need to have this picture (the word cloud image which changes, when my macro is currently run) displaying and changing each time a new word cloud image has been created (the generation of the tagcloud/wordcloud whatever you prefer to call it has already been taken care of generating a picture file which needs to be displayed). Thank you so much for reading, any advice on how to display this picture would be greatly appreciated.
 
Upvote 0
You shouldn't have a problem setting an Image Control's Picture to a valid jpg. To update the Picture in VBA you need to use the LoadPicture function.
 
Upvote 0
hmmm...and the correct way to set an image control to a picture is right click --> properties and then click on the elipses next to "Picture" and select the image. That's what I've tried to do with both a jpg and a png with no success unfortunately.

I was trying to attach a screenshot but I guess since I'm a new member I don't yet have permission to post attachments.
 
Upvote 0
It's definitely possible to set the Picture to a jpg (I just did it with one of my photos). Perhaps your jpg isn't valid.

It's not possible to attach screenshots here.
 
Upvote 0
OK, I've now got what you're doing.
So in the context of receiving an 'Invalid Picture' message, one has to wonder if the internal structure of the jpg/png are readable.
Can you assign the picture element to a non-word-cloud image?
 
Upvote 0
Can you assign the picture element to a non-word-cloud image?

I'm not completely sure what you meant by this question. The picture that is generated by the executable is a wordcloud/tagcloud jpg or png (I can change the extension in the batch file that I shell and it changes the file format). The picture is being generated fine and I can open and view it but when I try and attach it to the activex image control it gives me the invalid picture message. This is my first time working wit hactivex image control but i figured it would be the best way to go to have this image continuously update. This is the wordcloud generator my workbook uses to create the image file:

http://www.softpedia.com/get/Office-tools/Other-Office-Tools/IBM-Word-Cloud-Generator.shtml

It runs based off of the same tech as Jonathan Feinberg's wordle.net.
Since wordle.net has no API, I think that if I can get this to work the way I want it will be more user friendly than the commonly referred to "tag clouds using wordle" dynamic example on clearly and simply:

http://www.clearlyandsimply.com/clearly_and_simply/2010/11/wordle-tag-clouds-in-microsoft-excel.html
 
Upvote 0
Andrew,

Thanks for trying to help me with this issue. I've been busy and just looking back at this issue today. I have successfully attached other jpeg images that I have on machine. I took the word cloud image file which is creating the invalid picture error and put it within the same folder as the successfully attached jpeg and it still produced the invalid picture error. Is there any way to attach a picture file to this site? Something has to be wrong with my image which scares me because I don't have much control over this image as it is what is created by the word-cloud generator I call upon within my macro. Still rather puzzled I just hope that using an ActiveX control is the best way to do this after spending time trying to debug this issue. Thanks again all for any help, it truly is greatly appreciated! :)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,559
Messages
6,114,302
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top