Dear all,
I hope you can help me with an issue I have.
I had a perfect working piece of code that fetches an online picture (value in cell) and posted this in certain file. Never had any issues.
Since December it gives me the 1004-error "Unable to get the insert property of the picture class".
In addition when I run the macro on a Mac computer it is working fine. So I can't figure out what has changed. I tried different references but nothing helps.
Does somebody had similar experience in the past? And how did you manage this?
I hope you can help me with an issue I have.
I had a perfect working piece of code that fetches an online picture (value in cell) and posted this in certain file. Never had any issues.
Since December it gives me the 1004-error "Unable to get the insert property of the picture class".
In addition when I run the macro on a Mac computer it is working fine. So I can't figure out what has changed. I tried different references but nothing helps.
Does somebody had similar experience in the past? And how did you manage this?
VBA Code:
Sub PastePic()
If Picture_URL <> "" Then
Set pic = ActiveSheet.Pictures.Insert(Picture_URL)
With pic
.ShapeRange.LockAspectRatio = msoFalse
.Height = ActiveCell.MergeArea.Height
.Width = ActiveCell.MergeArea.Width
.Top = ActiveCell.MergeArea.Top
.Left = ActiveCell.MergeArea.Left
.Placement = xlMoveAndSize
End With
End If
End Sub