Adding images to excel from URL links
<p>I have a sheet that has URL links to Images in C3 upto C1002. The below code uses these URL links to put the images in A3 upto A1002. My problem is it works only some of the time. I've recently been getting "run time error '13" or "run time error '1004". My guess is that my code is missing a piece. The named range "Image_Location" is referring to range A3 to A1002.</p>

<pre><code>Private Sub URL_Images_Click()
Dim URL         As String 'file path of pic
Dim Pic         As Picture 'embedded pic
Dim rng         As Range 'range over which we will iterate
Dim Cell        As Range 'iterator

Application.ScreenUpdating = False

Set rng = Range("Image_Location")
For Each Cell In rng
URL = Cell.Offset(0, 2)
    If URL &lt;&gt; "" Then
        Set Pic = ActiveSheet.Pictures.Insert(URL)
        With Pic
            .ShapeRange.LockAspectRatio = msoFalse
            .Width = Cell.Width
            .Height = Cell.Height
            .Top = Rows(Cell.Row).Top
            .Left = Columns(Cell.Column).Left
        End With
    End If
Next

Application.ScreenUpdating = True
ECT_Image_Template.Hide
End Sub
</code></pre>