Forum

Notifications
Clear all

auto save

5 Posts
3 Users
0 Reactions
96 Views
(@rathanak)
Posts: 55
Trusted Member
Topic starter
 

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,

 
Posted : 11/09/2016 6:42 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi rathanak,

why don't you use the built in auto save features, rather than write VBA to do this?

Regards

Phil

 
Posted : 13/09/2016 7:12 pm
(@rathanak)
Posts: 55
Trusted Member
Topic starter
 

Hi Phil ,

could you give me guide to built in auto save features?

Regards,

Rathanak

 
Posted : 13/09/2016 8:16 pm
(@catalinb)
Posts: 1937
Member Admin
 

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.

Save.jpg

 
Posted : 13/09/2016 11:38 pm
(@rathanak)
Posts: 55
Trusted Member
Topic starter
 

Catalin, thanks

 
Posted : 15/09/2016 10:36 pm
Share: