View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Lonnie M. Lonnie M. is offline
external usenet poster
 
Posts: 184
Default Closing Other Workbooks

Tim, your code worked fine without crashing on my system.
It will only close the file if both excel files are in the same taskbar
window.
In the past I have seen some users' excel act quirky when closing a
file, the following code convention seemed to be the most stable for
me:

Application.DisplayAlerts = False
Workbooks(w.Name).Close SaveChanges:=False
Application.DisplayAlerts = True

Goodluck-Lonnie