View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Adding Images

Dan,
I've had that occasionally, I seem to remember it related to the format of
graphic, assuming the graphic is not corrupt in some way.
Try resaving the graphic with different colour depths and test them.

NickHK

"Dan Kelly" wrote in message
...
Okay got a bit further

Using the following code:


ActiveSheet.Pictures.Insert("Y:\Templates\Test\Log os\CoolGrey.jpg").Select
Selection.ShapeRange.Top = 29.25
Selection.ShapeRange.Left = 323.25
Selection.ShapeRange.Height = 44.25

I get a "red x" in an appropriatly shaped box on the form :)

How do I stop the red "x" from happening?

Dan

That's great - I now know what the position of the images is going to be

and
can work that out for the multiples.

I just need to know how to add the image to the Sheet :)

The First Image needs to be added from the Following location:

"Y:\Templates\Logos\Grey.jpg"

But I can only get a red "x"

Subsequent images on a sheet can be copies of the first, just at the new
position.

"Tom Ogilvy" wrote:

Activesheet.Pictures(1).Top
Activesheet.Pictures(1).Left

from the immediate window as a demo:

?ActiveSheet.Pictures(1).Top
1326
? activesheet.Pictures(1).TopLeftCell.Top
1326
? activesheet.Pictures(1).TopLeftCell.Address(0,0)
E105

--
regards,
Tom Ogilvy


"Dan Kelly" wrote:

Last couple of questions I hope - both related to images.

I have a standard Template that I am trying to replicate in VB in

order to
do allow an office rebrand to occur. The new designed template has

an image
on it, whose picture I am trying to find out - but there seems to be

no
information about position available.

Once I know the position of the image I want to insert the image

into the
correct position on the newly created page.

Any pointers?