我正在尝试使用以下代码将整张工作表从一个应用程序表复制到另一个应用程序表
'Open Application
MsgBox "Select Report"
Dim my_FileName3 As Variant
my_FileName3 = Application.GetOpenFilename("Excel Files (*.xl*)," & _
"*.xl*", 1, "Select ManMan File", "Open", False)
If my_FileName <> False Then
Workbooks.Open Filename:=my_FileName3
End If
'Set Active
var3 = ActiveWorkbook.Name
'Copy Everything
Dim lastRow3 As Long
lastRow3 = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
ActiveSheet.Range("a1:z" & lastRow3).Copy Destination:=Workbooks (var1).Sheets("Sheet4").Range(Var1R)
'Close Worksheet
Workbooks(var3).Close False
上面的代码有效,但问题是日期已经完全改变了。
知道我可能做错了什么吗?忽略空行。