Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. Sub AllFiles()
  2. Dim folderPath As String
  3. Dim filename As String
  4. Dim wb As Workbook
  5.  
  6. folderPath = "C:usersmyfilepath"
  7. Do While filename <> ""
  8. Application.ScreenUpdating = False
  9. Set wb = Workbooks.Open(folderPath & filename)
  10.  
  11. Worksheets("Current Roster").Range("A1:E1").Columns.AutoFit
  12.  
  13. filename = Dir
  14. Loop
  15. Application.ScreenUpdating = True
  16. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement