D
Dave O
I've written the following code to open all the files in a directory.
For some reason I get a "Code execution has been interrupted" message
at the "ActiveWorkbook.Save" line and at the "ActiveWorkbook.Close"
line, and I can't figure out why. Can anyone make a suggestion?
Thanks
Sub test()
Dim FileNm As String
FileNm = Dir("T:\2.7 Cost Baseline\*.xls")
Do While FileNm <> ""
Workbooks.Open FileName:=FileNm
ActiveWorkbook.Save
ActiveWorkbook.Close
FileNm = Dir
Loop
End Sub
For some reason I get a "Code execution has been interrupted" message
at the "ActiveWorkbook.Save" line and at the "ActiveWorkbook.Close"
line, and I can't figure out why. Can anyone make a suggestion?
Thanks
Sub test()
Dim FileNm As String
FileNm = Dir("T:\2.7 Cost Baseline\*.xls")
Do While FileNm <> ""
Workbooks.Open FileName:=FileNm
ActiveWorkbook.Save
ActiveWorkbook.Close
FileNm = Dir
Loop
End Sub