Sub MoveSheet()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim FolderPath As String, FileType As String, FileName As String, WriteToPath As String
FolderPath = Environ("userprofile") & "\Desktop\盘点数据" '读取桌面上的文件夹"盘点数据"的路径
WriteToPath = Environ("userprofile") & "\Desktop\审批数据" '读取做面上的文件夹"审批数据"的路径
FileType = "*.xlsx" '定义需要遍历的文件类型
FileName = VBA.Dir(FolderPath & FileType)
Dim FindWorkBook As Workbook, WriteToBook As Workbook, SheetCount As Long
Do Until FileName = ""
Set FindWorkBook = Workbooks.Open(FolderPath & FileName)
Set WriteToBook = Workbooks.Open(WriteToPath & Left(FileName, 4) & " 审批表.xlsx") '"审批表"可以按自定义修改
'将盘点表第一张表的数据拷贝到审批表的第二张中
SheetCount = WriteToBook.Sheets.Count
If SheetCount < 2 Then WriteToBook.Worksheets.Add after:=Sheets(Sheets.Count) '如果审批表中只有一张工作表就再创建一张新的工作表
FindWorkBook.Worksheets(1).Cells.Copy WriteToBook.Worksheets(2).Range("A1")
'关闭工作薄
FindWorkBook.Close savechanges:=True
WriteToBook.Close savechanges:=True
FileName = VBA.Dir '遍历下一个表
Loop
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub