Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim wBk As Workbook
- Dim sFileSpec As String
- Dim sPathSpec As String
- Dim sFoundFile As String
- sPathSpec = "J:Secure Downloads"
- sFileSpec = "*.xl*"
- sFoundFile = Dir(sPathSpec & sFileSpec)
- Do While sFoundFile <> ""
- Set wBk = Workbooks.Open(sPathSpec & sFoundFile)
- With wBk
- Application.DisplayAlerts = False
- wBk.SaveAs Filename:=.FullName, _
- Password:="summer"
- Application.DisplayAlerts = True
- End With
- Set wBk = Nothing
- Workbooks(sFoundFile).Close False
- sFoundFile = Dir
- Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement