Thread: image insertion
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
thomas donino thomas donino is offline
external usenet poster
 
Posts: 89
Default image insertion

This code came from andrew poulsom at mr excel.com but the site froze so i am
continuing here. Th following does all i ask except the image is still down
to row 4. I only want the image in A1:F1 after i resize and merge that range
to the size I want the image to fit in.

Sub Test()
'***Change to suit
Const PicName As String = "C:\Documents and Settings\All
Users\Documents\My Pictures\Sample Pictures\Picture1.jpg"
Dim Pic As Object
Set Pic = ActiveSheet.Pictures.Insert(PicName)
With Pic
.Top = Range("A1").Top
.Left = Range("A1").Left
.Height = Range("A1").RowHeight ', still is down to row 4
.Width = Range("A1:F1").Width
End With
End Sub

thank you