(Solved) – Method ‘Paste’ of object’_Worksheet’ Failed – how to resolve?

(solved)-–-method-‘paste’-of-object’-worksheet’-failed-–-how-to-resolve?

Runtime error 1004 Method Paste of object_worksheet failed being thrown in the below line. How to fix?

Dim usersheet As Worksheet
Set sCell = Application.InputBox("Select one cell", Type:=8) 'prompt user to choose a cell location
Set usersheet = ActiveSheet
If sCell Is Nothing Then Exit Sub
If sCell.Cells.count > 1 Then MsgBox "Pick one cell only"

For Each wdSH In wdApp.Documents(1).InlineShapes
    wdApp.Documents(1).Activate
    wdSH.Range.Copy
    usersheet.Activate
    usersheet.Paste Destination:=sCell 'throws the error
    Application.CutCopyMode = False
Next

Leave a Reply

Your email address will not be published. Required fields are marked *