PDA

View Full Version : Using embedded pics



Dazza
08-20-2009, 07:46 AM
I want Excel to carry graphics (jpgs). So I have Insert->Pictures (from file) on a sheet called 'GRAPHICS'. I note that the picture is given the name 'Picture 1'.

I have a form with an image box ('Image1').

How do set the Image1.picture to be the 'Picture 1'?

Or is there another way for excel to carry and reference picture files?

Many thanks.

tpoynton
08-20-2009, 01:03 PM
I am pretty sure the picture needs to be referenced as the file from your hard drive, not from the worksheet. VBA help discusses this, too. Welcome!

Dazza
08-21-2009, 03:18 AM
This solution is no good for me...
Whilst perched on the porcelain throne, I came up with another solution to get excel to carry graphics with it (and not have to reference files).
1) Create a suite of picture boxes (each with a different pic) and make them invisible
2) On run time, dynamically create a new picture box by copying from the invisible suite.

Lovely job

mdmackillop
08-21-2009, 04:29 AM
Hi Dazza,
Sounds like a workable solution.
For the benefit of others, can you post a sample file demonstrating your method?
Regards
MD

Dodgeitorels
09-21-2009, 11:24 AM
This solution is no good for me...
Whilst perched on the porcelain throne, I came up with another solution to get excel to carry graphics with it (and not have to reference files).
1) Create a suite of picture boxes (each with a different pic) and make them invisible
2) On run time, dynamically create a new picture box by copying from the invisible suite.

Lovely job


have you been successful in doing this little feat Dazza?
If yes, please post so we can learn from you.
Thank you

ccRider246
09-24-2009, 02:02 PM
I would be interested in knowing how you did it, as well. I have my wmf files stacked on top of each other and would like to set the zorder based on a selection in a listbox. I can't figure out how to assign the value of the listbox to a image name to bring that image to the surface.
I can it long form ...If listbox.value = "1020" then image1020.zorder(0). Since I have 100 images it would be nice to be able to say something like ...image(listbox.value).zorder(0)

Can someone help me with the syntax on this?

Oh, BTW, I am on an Excel UserForm (Excel 11)

secowu
08-12-2010, 10:26 PM
so,it looks a high ahrdly action.