Pictures.Insert not working correctly in excel 2008.

G

Guest

This code doesnt work correctly in Excel 2008 but works in Excel 2003.

Range("F32").Select
ActiveSheet.Pictures.Insert("T:\Sym-enh\CO\logo.bmp").Select

Picture gets on top of the sheet instead of cell F32.
 
R

Ron de Bruin

This is a bug

You can use this in 2007 as a workaround

Sub Test()
Dim myPict As Picture

With Range("F32")
Set myPict = .Parent.Pictures.Insert("T:\Sym-enh\CO\logo.bmp")
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

Top