problem inserting pictures in excel 2007 using macro.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I wrote a macro in excel 2003 which inserts a picture at a range cell
identified in the macro. With excel 2007, it ignores the range identified
and puts the picture in the top left of the work sheet.
Has anyone else run across this problem and found a solution?
dickiebird
 
You can use this in 2007 as a workaround

Sub Test()
Dim myPict As Picture

With ActiveCell
Set myPict = .Parent.Pictures.Insert("C:\Users\Ron\Desktop\New Backup\ron.jpg")
myPict.Top = .Top
myPict.Left = .Left
End With
End Sub
 

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