Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures/Graphics in/out Excel-cells
Hi all,
I know it's possible to insert a graphic/picture in an Excel-cell via 'comment'. But is it also possible to retrieve these pictures to use them elsewhere ? Suppose I have a picture inserted in cell (1,1) of Sheet "Try", and I start a program that begins with showing a userform "Screen1"... I want the background of "Screen1" being filled with the picture in cell(1,1)... Is there somekind of instruction that will result in doing so ? A bit like : Screen1.Picture = Thisworkbook.Sheets("Try").Range(.Cells(1,1),.Cell s(1,1)).???? In which 'compartement' of the cell is the picture enclosed ? I hope someone can point me the way. Greetings & Thanks from Baj |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures/Graphics in/out Excel-cells
Hi Baj,
Whether the picture is in a comment or some other shape would in effect mean copying the picture (Shift Edit), saving to from clipboard to file (API's) and re-loading (.LoadPicture) to the form's picture property. Quite a lot of code, you can get the essentials from Stephen Bullen's PastPicture.zip (intended for charts). http://www.oaltd.co.uk/Excel/Default.htm If viable maybe you can also ship image files with the xls and store their file names say in hidden cells. A simpler way would be to use an Image control (Controls toolbox menu), then do something like - Me.Picture = ActiveSheet.Image1.Picture (assuming 'Me' is in the form's code). You might also want to look at the form's PictureAligment and PictureSizeMode properties. As with all objects on a sheet, other than comments, the image control is not directly linked to a cell. So you would also need to devise some a means to relate particular images with cells. Perhaps loop through your images looking for their TopLeftCell property. Though of course if you can ensure a given named image is where you expect it to be that would make things easier. Regards, Peter T "baj" wrote in message oups.com... Hi all, I know it's possible to insert a graphic/picture in an Excel-cell via 'comment'. But is it also possible to retrieve these pictures to use them elsewhere ? Suppose I have a picture inserted in cell (1,1) of Sheet "Try", and I start a program that begins with showing a userform "Screen1"... I want the background of "Screen1" being filled with the picture in cell(1,1)... Is there somekind of instruction that will result in doing so ? A bit like : Screen1.Picture = Thisworkbook.Sheets("Try").Range(.Cells(1,1),.Cell s(1,1)).???? In which 'compartement' of the cell is the picture enclosed ? I hope someone can point me the way. Greetings & Thanks from Baj |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pictures/Graphics in/out Excel-cells
Thanks Peter... but I think I'll stick to the "more easy" uploading of the graphic files with a path, that's what I'm doing now. So I'll just refine it by putting those files in one map & directory. Thanks again, Baj |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Importing pictures or graphics | Excel Programming | |||
Is it possible to embed pictures or graphics in Excel? | Excel Discussion (Misc queries) | |||
Is it possible to embed pictures or graphics in Excel? | Excel Discussion (Misc queries) | |||
HOW CAN I PUT GRAPHICS/PICTURES IN A COMMENTS BOX IN EXCEL | Excel Discussion (Misc queries) | |||
Pictures in Cells in Excel? | Excel Programming |