Inser picture problem

  • Thread starter Thread starter Lincoln Burrows
  • Start date Start date
L

Lincoln Burrows

Hi,
I have a VFP coding for inserting a Picture to the active work book

loExcelSession.Cells(10,10).Select
loExcelSession.ActiveSheet.Pictures.Insert(lcLogoName).Select

In Excel 2007 the picture is not inserted in to correct cell what I
mentioned
But in Excel 2003 there is no any problem like that it is inserted in to
correct cell what I mentioned.
Why does this happens
Pls Help
 
Yes that is correct, in 2007 it not work like in 2003

This will work in 2003 and 2007

Dim myPict As Picture

With ActiveSheet.Range("J10")
Set myPict = .Parent.Pictures.Insert(lcLogoName)
myPict.Top = .Top
myPict.Left = .Left
myPict.Placement = xlMoveAndSize
End With
 
Thanks Ron,
Its working
But is there any way to give the Cell instead of Range
 
Back
Top