hi, I have a script that found included in my 'thisworkbook' portion of excel. I have Sharing Violation errors that do a couple of things.
I just tried to save a copy to another folder and rename it. it said the file was being used by someone else, as a 'copy', and would not let me rename file. a minute later I have access. (copy was only 20 seconds old).
it also will sometimes go read-only as a sharing violation while editing, if I don't catch that, I might lose a couple of hours of work if I don't save to a new file name.
the following script I found does not seem to correct that problem. is there a solution? thanks
would rather lock file out from all other access / sharing.
Option Explicit
Private Sub Workbook_Open()
If ActiveWorkbook.MultiUserEditing Then
Application.DisplayAlerts = False
ActiveWorkbook.ExclusiveAccess
Application.DisplayAlerts = True
MsgBox "Workbook Now Exclusive"
End If
If ActiveWorkbook.Name = "symbols.xls" Then
If Range("A1").Value = "." Then
Application.Calculate
End If
End If
End Sub