For a project I have to make label with images. When I add the images they should resize towards right and it does just that when I use test images. However, when I use the actual images it resizes them and pushes them left.
VBA Code:
'This function just puts the pictures by the labels
Function PrintImage(pic As Variant)
Dim PicRng As Range
Dim PicShape As Shape
PicColIndex = Application.ActiveCell.Column
PicRowIndex = Application.ActiveCell.Row
Set PicRng = Cells(PicRowIndex, PicColIndex)
Set PicShape = ActiveSheet.Shapes.AddPicture(pic, msoTrue, msoCTrue, PicRng.Left, PicRng.Top, PicRng.Width, PicRng.Height)
With PicShape
.LockAspectRatio = msoCFalse
.Height = 297
.Width = 297
End With
PicRowIndex = PicRowIndex + 10
End Function