rathanak
Member
Members
Forum Posts: 58
Member Since:
June 25, 2016
June 25, 2016
Offline
Dear expert,
How can we write vba code into a workbook which has option and timeset. The user only open that workbook and choose which workbook want to be auto save (active workbook, all workbook, or a specific workbook) and input time interval to start auto save...left it open and it will save all data automatically?
Regards,
Catalin Bombea
Iasi, Romania
Member
Dashboards
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
Forum Posts: 1917
Member Since:
November 8, 2013
November 8, 2013
Offline
Hi Rathanak,
You can use one of Microsoft code samples:
Sub SaveAll() ' Store the Activeworkbook in a variable. Set aw = ActiveWorkbook For Each wb In Workbooks If wb.Path <> "" Then ' Save file if it has been saved ' previously wb.Save Else ' If not previously saved, activate and show the ' Save As dialog box. wb.Activate Application.Dialogs(xlDialogSaveAs).Show End If Next aw.Activate ' Activate the original Activeworkbook. End Sub
You can change the code to make it work as you want, but as Phil said, it's better if you use the built in save features. See the image below for Auto Save settings.
Answers Post
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Brenda Wolf, Jeff Finkelstein
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1917
SunnyKow: 1432
Anders Sehlstedt: 900
Purfleet: 414
Frans Visser: 346
David_Ng: 306
Hans Hallebeek: 287
lea cohen: 246
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
Pawel Ganczarski
Molly King
Faraz Rafi
Anthony Blake
Jackb57
Ben Tooke
Kelsey Fennell
Jeffree Bunning
Jackie Memije
John Franzon
Forum Stats:
Groups: 3
Forums: 24
Topics: 6873
Posts: 30124
Member Stats:
Guest Posters: 49
Members: 33674
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —