Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub Save_close() 'Whichever file contains this code will remain open in the end Dim wb As Workbook For Each wb In Workbooks If wb.Name = ThisWorkbook.Name Then 'do nothing Else wb.Close savechanges:=True End If Next wb End Sub On Monday, 25 November 2013 05:38:15 UTC+5:30, pcorcele wrote: The heading says it all. I want to save any open Excel files and then Close Excel Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
save and exit macro | Excel Programming | |||
Save/exit macro | Excel Programming | |||
Excel Save as & Exit macro | Excel Programming | |||
Write macro don't ask to save when exit excel | Excel Programming | |||
Macro: Exit active workbook without save? | Excel Worksheet Functions |