View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default inserting pictures in Excel 2007 different than in Excel 2003

Hi Russ

Same problem here

Maybe you can use this, OK in 2003 and 2007

Sub Tester()
Dim myPict As Picture

With ActiveCell
Set myPict = .Parent.Pictures.Insert("C:\ron.png")
myPict.Top = .Top
myPict.Left = .Left
End With

End Sub




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Russ" wrote in message ...
I have found that Excel 2007 inserts pictures in a different way than Excel
2003. I noticed that Ron de Bruin commented in the thread €œhow to add
pictures to worksheet from url in Excel 2007€ of a possible bug in Excel
which may relate to what I found.
In Excel 2003 if you do
Activesheet.Pictures.Insert (filename)
The picture will be inserted in the upper left hand corner of the cell that
is selected.
In Excel 2007 the picture is inserted at a location that is independent of
the selected cell. Has anyone else encountered this problem?
Russ

--
russ