• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Auto Save excel file

Abhijeet

Active Member
Hi

I have macro but that is not work please tell me i want auto save excel file in every 5 min please tell me how to do this

after open this file in this line error is show
Application.OnTime TimeValue(vartimer), "Salva"
 

Attachments

  • SavingWorkbook.xls
    26.5 KB · Views: 0
This Recover files save i want to excel file auto save not recover file
I have link Table in PPT i want to update in PPT slide show automatically when changes in excel file
 
I check this when i input in excel then before save the file if i close then its ask file want to save or not means this is not work i want to auto save
 
I'd recommend built-in feature as well, as it saves back up to which you can revert if something went wrong with workbook. However, here's how I would do it on code side.

In Standard Module
Code:
Public sTime As Date
Sub Auto_Save()
On Error Resume Next
sTime = Now + TimeValue("00:05:00")
Application.OnTime sTime, "Auto_Save"
End Sub
Sub Stop_Save()
Application.OnTime sTime, "Auto_Save", , False
End Sub
Sub CloseWorkbook()
On Error Resume Next
Stop_Save
ThisWorkbook.Save
ThisWorkbook.Close
End Sub

In Workbook Module
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
Stop_Save
ThisWorkbook.Save
End Sub
Private Sub Workbook_Open()
Auto_Save
End Sub

I usually like to have some indication that code is firing. If you like, add "Beep" after "sTime" line in Auto_Save.
 
Hm? Like I wrote above insert "Beep" (without quotes) below "sTime = ..." line in Auto_Save sub.
 
When file is shared then different user also save the data that not reflect can u please tell me how to do this
 
Personally, I hate shared workbooks and avoid it like plague. I'm afraid I won't be able to help much there.
 
In share workbook this option is this work in this case
 

Attachments

  • upload_2016-5-11_18-18-53.png
    upload_2016-5-11_18-18-53.png
    96 KB · Views: 14
Back
Top