Dim NewPic As Object
Set NewPic = PlacementCell.Parent.Pictures.Insert(PicturePath)
NewPic.Name = "Logo" ' allows you to easily refer to the picture in the
future
' (i.e. ActiveSheet.Pictures("Logo"))
NewPic.Top = PlacementCell.Top
NewPic.Left = PlacementCell.Left
End Sub
--
- K Dales
The picture is actually in the spreadsheet, and has a range name defined
with it. I would not want to store the picture in a separate file. Will
your code works to access to picture from based on the range name?
Regards
Public Function PictureInRange(SearchRange As Range) As Object
Dim FoundPic As Object
For Each FoundPic In SearchRange.Parent.Pictures
If Not Intersect(FoundPic.TopLeftCell, SearchRange) Is Nothing Then _
Set PictureInRange = FoundPic
Next FoundPic
End Function
However, making use of the picture might be difficult. It can be copied and
pasted elsewhere on a worksheet, but I don't know any easy way to get it onto
a form (as far as I know you cannot paste into a userform image control.
Cheers
Andy
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info