This code only opens and closes a number of files found in a single folder.
- Sub test2() ' opens and closes all files in a folder
- Dim Mypath As Variant
- Dim excelfile As Variant
- Mypath = "W:\A\Construction\2006\Financial\Private\Internal Monthly Reports\September 2006\"
- excelfile = Dir(Mypath & "*.xls")
- Application.DisplayAlerts = False
- Do While excelfile <> ""
- Set wbOpen = Workbooks.Open(Filename:=Mypath & excelfile)
- excelfile = Dir
- MsgBox excelfile
- Application.DisplayAlerts = True
- End Sub
I am getting Update/Don't Update Links from those files requiring same that I wish not to receive even though I am using Application.Display. Alerts code above.