button for saving all workbooks

U

USH

hello !
anybody anybody knows that excel
has a "SAVE" button with a Floppy icon,
int the File Menu..

when you press this button you save the current workbook..

What if i have to save all open workbooks ???

tx !!
paolo
 
G

Gord Dibben

Don't know what autosave has to do with it but add this macro to your
Personal.xls

NOTE: will save all open workbooks without asking "do you want to save?"

Sub saveall()
Dim wb As Workbook
Application.DisplayAlerts = False
For Each wb In Application.Workbooks
wb.Save
Next
Application.DisplayAlerts = True
End Sub


Gord Dibben MS Excel MVP
 
U

USH

tx all !
one more idea..
is it possible to set that sub as function of excel instead than insed a
workbook ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top