我不知道这段代码有什么问题,有人可以找出错误吗? Igives我的错误:产生错误的代码有什么问题?
object does not support this property or method.
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
你可以把休息在你的代码的开始,直到你的错误步。 –
我已经提到它,但它重复:[请接受一些答案](http://meta.stackoverflow.com/help/someone-answers)。 –
你已经提出了9个问题,但没有接受任何答案......为什么不呢? –