T
thomas donino
So far this post has gotten no replies on mrexcel so I post here as well
hoping for some help
The code below sets the range where i want the image to reside and correctly
inserts the image to the range a1:f1 except the height. The image bottom edge
is down at row 4 instead of the bottom of row 1 which i have set the pixel
height before insertion.
Any idea how to set the height properly so it only covers the a1:f1 range?
Sub Test()
'***Change to suit
Const PicName As String = "X:\slksdffsldkfslhf .jpg"
Dim Pic As Object
Set Pic = ActiveSheet.Pictures.Insert(PicName)
ActiveSheet.Select
Rows("1:1").RowHeight = 69
Range("A1:F1").Select
Application.CutCopyMode = False
Selection.Merge True
With Pic
..Top = Range("A1").Top
..Left = Range("A1").Left
..Height = Range("A1").RowHeight 'need to fix this
..Width = Range("A1:F1").Width
End With
End Sub
__________________
Thomas Donino
BATL Management LP
hoping for some help
The code below sets the range where i want the image to reside and correctly
inserts the image to the range a1:f1 except the height. The image bottom edge
is down at row 4 instead of the bottom of row 1 which i have set the pixel
height before insertion.
Any idea how to set the height properly so it only covers the a1:f1 range?
Sub Test()
'***Change to suit
Const PicName As String = "X:\slksdffsldkfslhf .jpg"
Dim Pic As Object
Set Pic = ActiveSheet.Pictures.Insert(PicName)
ActiveSheet.Select
Rows("1:1").RowHeight = 69
Range("A1:F1").Select
Application.CutCopyMode = False
Selection.Merge True
With Pic
..Top = Range("A1").Top
..Left = Range("A1").Left
..Height = Range("A1").RowHeight 'need to fix this
..Width = Range("A1:F1").Width
End With
End Sub
__________________
Thomas Donino
BATL Management LP