Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save all files opened
Hi,
I usually use about 15 files at the same time and I would like to arrange a way to save all files at once instead of save the files one by one. Anyone knows a add in or a macro that could do this ? Thank you Ricardo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save all files opened
I found this example in the VBA help (see below) I would think this would work Set fc = f.Files For Each f1 in fc f1.close Next Sub ShowFolderList(folderspec) Dim fs, f, f1, fc, s Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(folderspec) Set fc = f.Files For Each f1 in fc s = s & f1.name s = s & vbCrLf Next MsgBox s End Sub "Carpe Diem" wrote: Hi, I usually use about 15 files at the same time and I would like to arrange a way to save all files at once instead of save the files one by one. Anyone knows a add in or a macro that could do this ? Thank you Ricardo |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save all files opened
Thank you for your help, I will try
Joel wrote: I found this example in the VBA help (see below) I would think this would work Set fc = f.Files For Each f1 in fc f1.close Next Sub ShowFolderList(folderspec) Dim fs, f, f1, fc, s Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(folderspec) Set fc = f.Files For Each f1 in fc s = s & f1.name s = s & vbCrLf Next MsgBox s End Sub "Carpe Diem" wrote: Hi, I usually use about 15 files at the same time and I would like to arrange a way to save all files at once instead of save the files one by one. Anyone knows a add in or a macro that could do this ? Thank you Ricardo |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save all files opened
Ricardo,
I assume you mean open Excel files in you instance of Excel: Private Sub CommandButton1_Click() Dim WB As Workbook For Each WB In Workbooks 'Avoid hidden WBs, e.g. Personal.xls etc If WB.Windows(1).Visible = True Then WB.Save End If Next End Sub NickHK "Carpe Diem" wrote in message oups.com... Hi, I usually use about 15 files at the same time and I would like to arrange a way to save all files at once instead of save the files one by one. Anyone knows a add in or a macro that could do this ? Thank you Ricardo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to save & close all opened files | Excel Discussion (Misc queries) | |||
log of when files opened... | Excel Programming | |||
save to same file as opened | Excel Discussion (Misc queries) | |||
can't save newly opened files | Excel Discussion (Misc queries) | |||
save Wsh to closed/opened WB | Excel Programming |