Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to save & close all opened files James A Excel Discussion (Misc queries) 1 December 23rd 06 05:16 AM
log of when files opened... AmyTaylor[_63_] Excel Programming 0 June 23rd 06 08:35 AM
save to same file as opened dmtech Excel Discussion (Misc queries) 6 March 8th 06 06:25 PM
can't save newly opened files Rasoul Khoshravan Excel Discussion (Misc queries) 1 December 9th 04 07:27 AM
save Wsh to closed/opened WB helmekki[_45_] Excel Programming 1 October 25th 04 08:28 PM


All times are GMT +1. The time now is 12:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"