SHG
Merry Texmas to you too!
Thanks for the try but I don't belive anything is happening with this code.
I tested with a new .xlsm workbook and added your code as a module.
The logfile to write to is named
Daily Schedule Access Logfile.xlsx
and is located in the
\\fspbrf01\GROUP\Maintenance\Work Management\Public\Work Management KPIs\SAP Scheduling\Schedule logfile\
directory. The extra space between Management & KPIs is not a typo, it was how the directory structure was created long before I got here.
Your code has been edited to match the actual directory structure and work book name.
Private Sub Workbook_Open()
Const sFile As String = "\\fspbrf01\GROUP\Maintenance\Work Management\Public\Work Management KPIs\SAP Scheduling\Schedule logfile\Daily Schedule Access Logfile.xlsx"
If Len(Dir(sFile)) Then
Workbooks.Open sFile
With ActiveWorkbook.Worksheets(1)
.Cells(.Rows.Count, "A").End(xlUp).Offset(1).Value = Environ("username")
.Close SaveChange:=True
End With
Else
MsgBox "Log file " & sFile & " not found."
End If
End Sub
Nothing is being written to "Daily Schedule Access Logfile.xlsx" nor is a message box reporting any errors even if I temporarily remove the "Daily Schedule Access Logfile.xlsx" file.
Bookmarks