If that is the only time it crashes, use it to your advantage
On Error Resume Next Workbooks(Workbooks.Count).Close SaveChanges:=True, Filename:=NewName If Err.Number <> 0 then Workbooks(Workbooks.Count).Close SaveChanges:=False Error = 0
If that is the only time it crashes, use it to your advantage
On Error Resume Next Workbooks(Workbooks.Count).Close SaveChanges:=True, Filename:=NewName If Err.Number <> 0 then Workbooks(Workbooks.Count).Close SaveChanges:=False Error = 0
I expect the student to do their homework and find all the errrors I leeve in.
Please take the time to read the Forum FAQ