I'm have created many excel reports and the same is being used by various users in my company. I need to track the usage of these reports. Therefore, I created a file called "log.inf" in a network drive. In the excel reports, the workbook open event opens the text file (log.inf) and updates the info needed to be tracked. This works perfectly fine on my system (Excel 2007/ Windows Vista) and some of the users systems. However, some users (Excel 2010/ Windows 7) get the run time Error 75 - Path/ File Access Error. However, i have ensured that the users definitely have access to the network drive and the specific "log.inf" file. Below is the Code I'm using:
Also, I have tried keeping an excel file in logs folder and tried updating the excel file for those users who were getting error. This works fine, ruling out the possibility of Network Permission issue.
Private Sub Workbook_Open()
Dim ff As Long
Application.ScreenUpdating = False
Application.DisplayAlerts = False
On Error GoTo netcon
ff = FreeFile()
Open "\\fileshares.corp\groups\RAPID_REPORTS\logs\log.inf" For Append As #ff
Print #ff, ThisWorkbook.Sheets("AI_O").Range("A2").Value & ";" & Environ("USERDOMAIN") & ";" & Environ("USERNAME") & ";" & Now
MsgBox "You are currently not connected to the network. Please connect to the network and reopen the file."
Any help will be greatly appreciated.
Thanks in advance,
Saiju Paul C