测试或检查是否存在工作表
Dim wkbkdestination As WorkbookDim destsheet As WorksheetFor Each ThisWorkSheet In wkbkorigin.Worksheets 'this throws subscript out of range if there is not a sheet in the destination 'workbook that has the same name as the current sheet in the origin workbook. Set destsheet = wkbkdestination.Worksheets(ThisWorkSheet.Name) Next
destsheet
If wkbkdestination.Worksheets(ThisWorkSheet.Name) Then
Cats萌萌