I tried to embed a new part into an existing code which could be insert a picture from a path (example C:\).
The size of the picture should be exact match with range C2:D2. When the code is run place the next picture in next row C2+31 : D2+31.
I tried this one but it's not working.
With Worksheets("LABEL")
szPicFileName = Range("J2").Value
Set pic = ActiveSheet.Pictures.Insert(szPicFileName)
r = 1
For i = 2 To UBound(a)
.Range("d4:d26") = Application.Transpose(Array(a(i, 1)))
With .Range("A1:F31")
.Copy Worksheets("sheet6").Range("a" & r)
rFirstRow = 2 + r
rLastRow = 2 + r
cFirstColumn = 3
cLastColumn = 4
Set Rng = Range(Cells(rFirstRow, cFirstColumn), Cells(rLastRow, cLastColumn))
With pic
.Height = Rng.Height
.Width = Rng.Width
.Left = Rng.Left
.Top = Rng.Top
End With
Worksheets("sheet6").Rows(r + 1).RowHeight = 73
End With
r = r + 31
Next
End With
Bookmarks