我不知道这段代码有什么问题,有人可以找出错误吗?我给了我错误:
对象不支持此属性或方法。
Sub copyrow2()
Dim Lastro As Integer
Dim nLastro As Integer
Dim Rng As Range
nLastro = ActiveSheet.Cells(Rows.Count, 10).End(xlUp).Row
Lastro = ActiveSheet.Cells(Rows.Count, 9).End(xlUp).Row + 1
If Lastro < nLastro Then
With oSht = ActiveSheet
Set Rng = oSht.Range("J" & Lastro & ":" & "k" & nLastro)
Rng.Copy
oSht.Range("H" & Lastro).Select
ActiveSheet.Paste
End With
End If