Circumstances:
Shared workbook on a server being used as a dispatch board. This is updated by at least two people at a time - hardly ever more than that (and they sit right next to each other). I have a VBA code inserted as a Macro into the workbook that automatically saves the workbook every minute so that everyone can see the changes made and will not have to press the Save button every time they make a change because people forget and then a big mess is made.The code is below.
What I want to add to this is a way to possibly make this run in the background for the dispatch board workbook only. We work in several different excel workbooks at a time on a daily basis and any time we have the dispatch board workbook open it saves the other workbooks that are open as well. We do not want this to occur, we would only like the Dispatch board workbook to be saved.Dim NextTime As Date
Sub Auto_Open()
NextTime = Now + TimeValue("0:05:00") ' in 5 minutes
Application.OnTime NextTime, "SaveMe"
End Sub
Sub SaveMe()
ThisWorkbook.Save
NextTime = Now + TimeValue("0:05:00") ' in 5 minutes
Application.OnTime NextTime, "SaveMe"
End Sub
Sub Auto_Close()
If NextTime <> 0 Then
Application.OnTime NextTime, "SaveMe", schedule:=False
NextTime = 0
End If
End Sub
I don't know much about writing VBA code, but I can understand it as I've taken some Java courses and fooled around with PHP/MySQL.
Any help would be appreciated, thank you!
Bookmarks