我得到
错误1004。
我尝试用F8调试。
Sub LoadNew()
...
Call CopyColumn("New", "A1", "Total", "A1")
End Sub
Private Sub CopyColumn(FromSheet As String, FromColumn As String, ToSheet As String, ToColumn As String)
If IsEmpty(Sheets(ToSheet).Range(ToColumn).Value) = True Then
Sheets(FromSheet).Range(Range(FromColumn), Range(FromColumn).End(xlDown)).Copy Sheets(ToSheet).Range(ToColumn)
Else
Sheets(FromSheet).Range(Range(FromColumn), Range(FromColumn).End(xlDown)).Copy Sheets(ToSheet).Range(ToColumn).End(xlDown).Offset(1, 0)
End If
End Sub
我希望将整列从一张纸复制到第二张纸。