I have two workbooks: Master and TMT.
I want to open TMT and paste:
- Sheet(1) to the "TMT1" sheet in the Master workbook
- Sheet(2) to the "TMT2" sheet in the Master workbook
- Sheet(4) to the "TMT3" sheet in the Master workbook
- Sheet(5) to the "TMT4" sheet in the Master workbook
I have provided some long winded code which does this, however I would love to be able to loop it to make the code more efficient!
Here is the code I have so far!
Sub TMT()
Dim wbMaster As Workbook, wbCons As Workbook, wsMaster As Worksheet
Application.ScreenUpdating = False
Set wbMaster = ThisWorkbook
Set wbTMT = Workbooks.Open("/Users/edwardlee/Downloads/TMT.xlsm")
wbTMT.Sheets(1).Cells.Copy
wbMaster.Sheets("TMT1").Activate
ActiveSheet.Range("A1").Select
ActiveSheet.Paste
wbTMT.Sheets(2).Cells.Copy
wbMaster.Sheets("TMT2").Activate
ActiveSheet.Range("A1").Select
ActiveSheet.Paste
wbTMT.Sheets(4).Cells.Copy
wbMaster.Sheets("TMT3").Activate
ActiveSheet.Range("A1").Select
ActiveSheet.Paste
wbTMT.Sheets(5).Cells.Copy
wbMaster.Sheets("TMT4").Activate
ActiveSheet.Range("A1").Select
ActiveSheet.Paste
End Sub