![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
how can i make a auto close macro so that it save all active workbook when closing down?
sub auto_closed ActiveWorkbook.save End Sub i can only make it save 1 active workbook ;/ |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
You could try something like this:-
Code:
Sub Auto_Close()
Dim wb As Workbook
On Error Resume Next
For Each wb In Excel.Workbooks
wb.Save
Next
End Sub
D |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|