Hi,
I am hoping someone can help me modify the following code. Currently I am using this to bypass the save prompt and auto save the workbook on close. The issue I'm running into is that if I have the file open and a co-worker opens the file in read only mode, it will save a duplicate copy of the file. Some info that may or may not be helpful: These files are on a network location. The file is created in a certain location (default save location as listed under excel save properties). Once the file has been filled/populated it gets moved to a different file (our way of digitally filing, by customer name). The duplicate file re-appears in the default location with the same name, so its easy to tell that there are two. The auto save works perfectly fine as long as someone doesn't open in read-only. Can it be updated to not save if the file is in read-only mode?
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayAlerts = False
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub
Thanks in advance
Jason
I am hoping someone can help me modify the following code. Currently I am using this to bypass the save prompt and auto save the workbook on close. The issue I'm running into is that if I have the file open and a co-worker opens the file in read only mode, it will save a duplicate copy of the file. Some info that may or may not be helpful: These files are on a network location. The file is created in a certain location (default save location as listed under excel save properties). Once the file has been filled/populated it gets moved to a different file (our way of digitally filing, by customer name). The duplicate file re-appears in the default location with the same name, so its easy to tell that there are two. The auto save works perfectly fine as long as someone doesn't open in read-only. Can it be updated to not save if the file is in read-only mode?
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayAlerts = False
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub
Thanks in advance
Jason