View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Captain Canada[_2_] Captain Canada[_2_] is offline
external usenet poster
 
Posts: 2
Default want image to define the cell size

Thanks, Joel, for your answer. I was hoping there'd be an easy way, but at
least I'll know not to keep banging my head against this wall. All my images
in this file are going to be the same size, so I can probably just define all
the rows to be the height of the image, and that will get the job done ...
hopefully.

Cheers,
John
_______________
"Joel" wrote:

There is no way from the worksheet and it is tricky from VBA code. The
problem is the pcitures are not part of the worksheet cells. A picture sits
ontop of the cells and is independant of the cell locations.

Both cell and pictures are referenced to pixel locattions in the window.
they both havve properties : Left, Top, Height, Width. but you can't lock a
picture pixel location to a speadsheet pixel location. If you change the
width or height of the rows and columns, the picture doesn't move the cells
will move.

"Captain Canada" wrote:

Hi, I'm new to this forum, but not to XL. I know how to paste an image (e.g.
jpg) into XL and have it occupy however many cells as determined by its pixel
resolution; what I'd *like* to do is paste an image into a cell and force the
cell (and hence row and column) to expand to accommodate the image's size.
There's probably some dumb formating trick that I'm missing ... Anybody's
help would be much appreciated! Thanks.