Basically I have this sub which inserts pictures into my worksheet:
ActiveCell.Select
Dim picname As String
picname = ActiveCell.Value
ActiveCell.Offset(-1, 0).Select
Dim picture
Set picture = ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\Images\" & picname & ".jpg")
I am running this sub with Application.Run inside of a loop. If there is no picture in the path folder, I get "Run-time error 1004: Unable to get the Insert property of the Picture class", and the loop stops. How do I bypass the error so that the loop can continue?