My Goal: To have other users open a workbook on the network without having to click button to open it as read only.
I have been trying to get rid of the "File In Use" message for the other users since they only need a read only copy. I am the only one who needs to know if it is in use because I will make changes to the workbook tools and have to save them.
I have set the Save As preferences so that it requires a password for modification and checked the read only checkbox. But that dialog box is popping up for the users. I am trying to eliminate any file in use dialog box for users other than myself.
Here is my workbook open procedure...
Private Sub Workbook_open() Dim wBook As Workbook Dim UsrName As String UsrName = Environ("username") On Error Resume Next Set wBook = Workbooks("Excel_Tools.xls") If UsrName <> "j" Then If wBook Is Nothing Then 'Not open 'just let it open Else 'It is open 'Excel_Tools.xls is the name of the book trying to open 'Trying to force it to open as read only with no dialog boxes Workbooks.Open Filename:="Excel_Tools.xls", ReadOnly:=True End If Else 'if it is "j" that is opening it let him know if someone has it locked. 'Do nothing and let Excel send a dialog box stating that it is open 'if indeed it is. End If Windows("Excel_Tools.xls").Visible = False Run "AddMenus" End Sub