Have the following code running in a workbook. This code works great as long as you have copied an image before clicking on the control button to start the code. If you do not, the following occurs:
Believe I have something out of sequence. Would like the message box to come up & exit sub on OK. Assistance appreciated...
Run Time Error 1004
PasteSpecial method of worksheet class failed.
Section of code flagged with error:
ActiveSheet.PasteSpecial Format:="Microsoft Office Drawing Object", Link:= _
False, DisplayAsIcon:=False
Sub Paste_Image()
'
' Paste_Image Macro
'
'
Call UnProtectAll
Call DeletePiccies
Range("B20").Select
ActiveSheet.PasteSpecial Format:="Microsoft Office Drawing Object", Link:= _
False, DisplayAsIcon:=False
On Error GoTo ErrMsg11
Range("I15").Select
On Error GoTo ErrMsg11
ErrMsg11:
Call Select_Clear
MsgBox ("If no Cheque Image Appears, Select & Copy Image and Try Again" & vbCrLf & _
""), , "Image Paste Error"
Call ProtectAll
Exit Sub
Call ProtectAll
End Sub
Believe I have something out of sequence. Would like the message box to come up & exit sub on OK. Assistance appreciated...
Run Time Error 1004
PasteSpecial method of worksheet class failed.
Section of code flagged with error:
ActiveSheet.PasteSpecial Format:="Microsoft Office Drawing Object", Link:= _
False, DisplayAsIcon:=False
Sub Paste_Image()
'
' Paste_Image Macro
'
'
Call UnProtectAll
Call DeletePiccies
Range("B20").Select
ActiveSheet.PasteSpecial Format:="Microsoft Office Drawing Object", Link:= _
False, DisplayAsIcon:=False
On Error GoTo ErrMsg11
Range("I15").Select
On Error GoTo ErrMsg11
ErrMsg11:
Call Select_Clear
MsgBox ("If no Cheque Image Appears, Select & Copy Image and Try Again" & vbCrLf & _
""), , "Image Paste Error"
Call ProtectAll
Exit Sub
Call ProtectAll
End Sub