Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Private Sub CopySheets(ByVal Path As String)
  2. Dim Item As Object
  3. Dim oWbk As Workbook
  4. Set oWbk = Workbooks.Open(Path)
  5. For Each Item In oWbk.Sheets
  6. oWbk.Sheets(Item.Name).Copy After:=ThisWorkbook.Worksheets(ThisWorkbook.Worksheets.Count)
  7. Next
  8. oWbk.Close False
  9. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement