Closing Other Workbooks
Lonnie,
Thanks. After I found and deleted the old PDFMaker.xla (version 5, and I've
upgraded to version 6) it now works without crashing. I'd thought about
turning off DisplayAlerts, so I'll follow your advice and do that as well.
Thanks to both Jake and Lonnie!
Tim
"Lonnie M." wrote in message
oups.com...
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
|