choubix
06-30-2008, 06:18 PM
hi,
I have the following code in my VBE to save a workbook:
Sub Backup_WB()
Dim Wk As Workbook
Set Wk = Workbooks("ourwb.xls")
Application.DisplayAlerts = False
Wk.SaveAs Filename:="P:/Product Monitors/Backup/ourwb " & _
Format(Date, "YYYYMMDD") & " " & Format(Time, "HHMMSS") & ".xls"
Wk.SaveAs Filename:="P:/Product Monitors/ourwb.xls"
End Sub
the thing is: the workbook is on sahred drive AND is used simultaneously by different users.
is there a way for me to make sure I have the most up to date workbook saved? (a workbook that takes into account all the inputs from all users during the day)
since a few users may have the workbook open on their computer at the same time: won't it save the workbook as many times as there are open workbooks on my colleagues' computers?
right now the macro saves the workbook at 11:59 pm every day
so my objective is to save the most up to date workbook itself AND a backup copy at given intervals of time.
thanks :)
I have the following code in my VBE to save a workbook:
Sub Backup_WB()
Dim Wk As Workbook
Set Wk = Workbooks("ourwb.xls")
Application.DisplayAlerts = False
Wk.SaveAs Filename:="P:/Product Monitors/Backup/ourwb " & _
Format(Date, "YYYYMMDD") & " " & Format(Time, "HHMMSS") & ".xls"
Wk.SaveAs Filename:="P:/Product Monitors/ourwb.xls"
End Sub
the thing is: the workbook is on sahred drive AND is used simultaneously by different users.
is there a way for me to make sure I have the most up to date workbook saved? (a workbook that takes into account all the inputs from all users during the day)
since a few users may have the workbook open on their computer at the same time: won't it save the workbook as many times as there are open workbooks on my colleagues' computers?
right now the macro saves the workbook at 11:59 pm every day
so my objective is to save the most up to date workbook itself AND a backup copy at given intervals of time.
thanks :)