kylefoley76
Well-known Member
- Joined
- Mar 1, 2010
- Messages
- 1,553
My excel crashes a lot and when it does i have to resave and rename all of my workbooks, usually about 7 into their individual folder. i'm tired of this. i'm trying to get excel to save all workbooks periodically. the problem with the following code is that it freezes excel while its running and it puts each workbook to the front one by one when it saves it. i want it to save all workbooks without bringing each workbook to the front and without freezing excel
Sub save_all_books_periodically()
Dim a, i&, fn$
ReDim a(1 To Workbooks.Count)
For k = 1 To 2
For i = 1 To Workbooks.Count
'a(i) = Workbooks(i).Save
Workbooks(i).Save
Next i
Application.Wait (Now + TimeValue("0:00:10"))
Next k
End Sub