In an excel template there is a menu option that opens the "open file" dialog box. I choose a file from there and click okay. If someone else has it open there is no message saying so but the title bar has read only. I want the message to appear warning the user that so and so already has it open.
I did find the Notify option in the Open Event but there is a snag in that for me. I do get the following message:
"'new_file.xls' is being modified by Karen. Open as read-only?"
But when I select ok or cancel I get an error on the open line:
"Method 'Open' of object 'Workbooks' failed".
Any suggestions?
_________________________________________________________
Sub Open_Existing_Wkbk()
sFilename = Application.GetOpenFilename("All files (*.xls*), *.xlt*")
If sFilename = False Then
Exit Sub
Else
Workbooks.Open FileName:=sFilename, Notify:=False
End If
End Sub
________________________________________________________
I did find the Notify option in the Open Event but there is a snag in that for me. I do get the following message:
"'new_file.xls' is being modified by Karen. Open as read-only?"
But when I select ok or cancel I get an error on the open line:
"Method 'Open' of object 'Workbooks' failed".
Any suggestions?
_________________________________________________________
Sub Open_Existing_Wkbk()
sFilename = Application.GetOpenFilename("All files (*.xls*), *.xlt*")
If sFilename = False Then
Exit Sub
Else
Workbooks.Open FileName:=sFilename, Notify:=False
End If
End Sub
________________________________________________________