mickyflash
Board Regular
- Joined
- Jan 29, 2009
- Messages
- 77
H Guys - I have this code that deletes any images on the worksheet and then takes the url address in A2 and displays the image from the address 4 columns to the left.
This working (almost) in so much as the image is getting displayed, but I keep getting a debug error relating to the
Can anyone see why Im having this error come up? Thanks in advance
Code:
Public Sub Add_Images_To_Cells()
ActiveSheet.Pictures.DELETE
Dim lastRow As Long
Dim URLs As Range, URL As Range
With ActiveSheet
lastRow = .Cells(Rows.Count, "A").End(xlUp).Row
Set URLs = .Range("A2:A" & lastRow)
End With
For Each URL In URLs
URL.Offset(0, 4).Select
URL.Parent.Pictures.Insert URL.Value
DoEvents
Next
End Sub
This working (almost) in so much as the image is getting displayed, but I keep getting a debug error relating to the
Code:
URL.Parent.Pictures.Insert URL.Value line.
Can anyone see why Im having this error come up? Thanks in advance
Last edited: