Skip to content

Instantly share code, notes, and snippets.

@n8sty
Created January 21, 2014 21:12
Show Gist options
  • Save n8sty/8548479 to your computer and use it in GitHub Desktop.
Save n8sty/8548479 to your computer and use it in GitHub Desktop.
'Open all files in a given folder
Sub OpenAllFilesInFolder()
'target folder
directory = "T:\Shared Documents\Knowledge Transfer\Tasks\Checklist"
Set FSO = CreateObject("Scripting.FileSystemObject")
Set folder = FSO.GetFolder(directory)
For Each file In folder.Files
Workbooks.Open file
Next file
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment