External images

  • Thread starter Thread starter Guest
  • Start date Start date
Hi Gav,

<<What i was hoping was for the cell to wrap according to the image
size...basically accomodate the image>>

You can do this for the row height by adding the following line of code
directly below the lines that set the top and left of the image:

rngCell.RowHeight = objImage.Height

Column width is not so simple because it does not have a consistent unit of
measurement. ColumnWidth is measured in terms of the font being used in that
column, so it's difficult to convert to the units of the image width. At any
rate, you can only have one column width for a column and you're stacking
multiple images in the same column, so I'm not so sure how well this would
work anyway.

<<Unfortunately, the cell location will vary bacause the amount of data that
pastes inbetween will vary. Can we use the heading as a target>>

Yes, that is how the code is constructed now. Unfortunately, it means
that you will have to select each heading cell and run it for each heading.
To add a button to run this code, right-click over the toolbar area and
display the Forms toolbar. The Button object will be on the second row,
right side. Click it and then use your mouse to drag out a button on the
worksheet. The Assign Macro dialog will pop up as soon as you finish. Select
the InsertImageBelowRange macro and click OK. Edit the button text to say
whatever you want. Now when you click the button the procedure will run.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


Gav said:
Hello Rob, getting there. What i was hoping was for the cell to wrap
according to the image size...basically accomodate the image????
Unfortunately, the cell location will vary bacause the amount of data that
pastes inbetween will vary. Can we use the heading as a target????? Have the
image paste 1 row below the heading, column B??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top