Greetings,
I am receiving the "method Range of object worksheet failed" error on the line below within the context of the short script further below.
I suppose the error is referring to the "Copy" method used with the Range Object as I have it structured (using the "with" statement)
I am receiving the "method Range of object worksheet failed" error on the line below within the context of the short script further below.
Code:
.Range(h, h.End(xlToRight)).Copy
Code:
For Each ws In COM.Worksheets
With ws
k = .Cells(Rows.Count, "A").End(xlUp).Row
Do Until k = 2
If .Cells(k, b) <> "" Then
Set h = .Cells(k, b)
k = k - 1
Else
.Range(h, h.End(xlToRight)).Copy
.Cells(k, b).PasteSpecial Paste:=xlPasteValues
k = k - 1
End If
Loop
End With
Next ws
I suppose the error is referring to the "Copy" method used with the Range Object as I have it structured (using the "with" statement)