I am using the following in a loop to add 3 different images to a worksheet and then place in the correct location.
Multiple files are created but use only the same 3 images
I have tried to add the image to the specified cell but sometimes it doesn't place it in the specified cell.
With the above code I am sometime getting an error when
tries to execute but if I F8 that line it executes with no problem. The error message that displays is 'Run-time error '1004': Paste method of Worksheet class failed'
I don't understand why this only happens sometimes and with different images that do paste correctly when utilised in previously created files within the loop.
TIA
Multiple files are created but use only the same 3 images
Code:
Set objImage = ActiveSheet.Pictures.Insert(ActiveWorkbook.Path & "\Images\" & strImageFile)
objImage.Cut
rngInsert.Offset(-29, 2).Select
ActiveSheet.Paste
With the above code I am sometime getting an error when
Code:
ActiveSheet.Paste
I don't understand why this only happens sometimes and with different images that do paste correctly when utilised in previously created files within the loop.
TIA