Excel VBA - How to Copy Sheets to Another Workbook

Описание к видео Excel VBA - How to Copy Sheets to Another Workbook

Excel VBA Learn how to copy sheets to another workbook.

The code used in this video:

Sub CopySheets()

Dim weeklyReportWorkbook As Workbook
Dim finalReportWorkbook As Workbook

Set weeklyReportWorkbook = Workbooks("Weekly Report")
Set finalReportWorkbook = Workbooks("Final Report")

Dim weeklyReportSheet As Worksheet

For Each weeklyReportSheet In weeklyReportWorkbook.Sheets
weeklyReportSheet.Copy After:=finalReportWorkbook.Sheets(finalReportWorkbook.Sheets.Count)
Next

End Sub

Комментарии

Информация по комментариям в разработке