![]() |
VBA Code req to close all workbooks
Many Thanks I had forgot how simple that is...
Rgds Neil *** Sent via Developersdex http://www.developersdex.com *** |
VBA Code req to close all workbooks
You might also want to test for Personal.xls, you probably don't want to
close that. -- HTH Bob Phillips "Neil Atkinson" wrote in message ... Many Thanks I had forgot how simple that is... Rgds Neil *** Sent via Developersdex http://www.developersdex.com *** |
VBA Code req to close all workbooks
Hi Bob,
A good suggestion. Neil, Should you wish to keep your Peronal.xls workbook open, as per Bob's suggestion, then try this amendment: '==================== Sub Workbook_Open() Dim WB As Workbook For Each WB In Application.Workbooks If WB.Name < ThisWorkbook.Name _ And LCase(WB.Name) < "personal.xls" Then WB.Close SaveChanges:=True End If Next WB End Sub '<<==================== --- Regards, Norman "Bob Phillips" wrote in message ... You might also want to test for Personal.xls, you probably don't want to close that. -- HTH Bob Phillips "Neil Atkinson" wrote in message ... Many Thanks I had forgot how simple that is... Rgds Neil *** Sent via Developersdex http://www.developersdex.com *** |
All times are GMT +1. The time now is 09:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com