Skip to content

Instantly share code, notes, and snippets.

@zhonmaz
Created April 6, 2022 03:45
Show Gist options
  • Save zhonmaz/eab1bc1856e6bac4a91029f570c6d520 to your computer and use it in GitHub Desktop.
Save zhonmaz/eab1bc1856e6bac4a91029f570c6d520 to your computer and use it in GitHub Desktop.
Sub copy()
Path = "K:\My Drive\Working\SHAREKYNANG\Content\"
Filename = Dir(Path & "*.xls*")
Do While Filename <> ""
Workbooks.Open Filename:=Path & Filename, ReadOnly:=True
For Each Sheet In ActiveWorkbook.Sheets
Sheet.copy after:=ThisWorkbook.Sheets(1)
Next
Workbooks(Filename).Close
Filename = Dir()
Loop
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment