i have a .xls file into a dir server with all free permission on this dir, inested the tipical ms message "file is alreday opend from..." when a user open a xls file and jhis is alredy opened the same, is possible:
to show a mshbox:
Attention this file is in use from & "name of user have opoened the file for first" click on msg box close the .xls file...
i use this function to know wich user have opened the .xls file:
Sub USER_NAME()
Dim wshNet
ThisWorkbook.Activate
Sheets("RATE").Select
Set wshNet = CreateObject("WScript.Network")
wshGetUserName = wshNet.UserName
Set wshNet = Nothing
Range("A1") = ""
Range("A1") = UCase(wshGetUserName)
End Sub
to show a mshbox:
Attention this file is in use from & "name of user have opoened the file for first" click on msg box close the .xls file...
i use this function to know wich user have opened the .xls file:
Sub USER_NAME()
Dim wshNet
ThisWorkbook.Activate
Sheets("RATE").Select
Set wshNet = CreateObject("WScript.Network")
wshGetUserName = wshNet.UserName
Set wshNet = Nothing
Range("A1") = ""
Range("A1") = UCase(wshGetUserName)
End Sub