xcelnovice
Board Regular
- Joined
- Dec 31, 2011
- Messages
- 81
Hi, the below code copies from one workbook a few different ranges in one workbook and pastes them in another workbook. It works so my skill set says repeat the same code, change the tab names in the code for the other 20 tabs. Is there a better way to repeat this code so it captures all the other sheets.
VBA Code:
sub CopyPaste()
Dim x As Workbook
Dim y As Workbook
Set x = Workbooks.Open(xxxx)
Set y = Workbooks.Open(xxxx)
x. Sheets(“Sheet1”).Range(“D13:L62”).Copy
y.Sheets(“SheetA”).Range(“D13:L62”).PasteSpecial
End Sub