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
 

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