Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
baj baj is offline
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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   Report Post  
Posted to microsoft.public.excel.programming
baj baj is offline
external usenet poster
 
Posts: 24
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing pictures or graphics Sentinel Excel Programming 0 May 22nd 06 11:53 AM
Is it possible to embed pictures or graphics in Excel? msleah Excel Discussion (Misc queries) 1 December 20th 05 01:09 PM
Is it possible to embed pictures or graphics in Excel? msleah Excel Discussion (Misc queries) 1 December 20th 05 01:03 PM
HOW CAN I PUT GRAPHICS/PICTURES IN A COMMENTS BOX IN EXCEL Judy Excel Discussion (Misc queries) 3 November 12th 05 08:08 AM
Pictures in Cells in Excel? Joe 90 Excel Programming 3 October 7th 03 12:04 AM


All times are GMT +1. The time now is 03:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"