Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT
Private Sub Workbook_Open() With Application .DisplayAlerts = False End With ActiveWorkbook.UpdateLinks = xlUpdateLinksAlways With Application .DisplayAlerts = False End With Debug.Print "open" WriteFile Environ("USERNAME") & " entered at " & Now() End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) Debug.Print "closed" WriteFile Environ("USERNAME") & " left at " & Now() End Sub Sub WriteFile(strText As String) Dim MyFile As String, fNum As Integer MyFile = "\\ukhibmdata02\rights\Asset Services Risk Team\DCDIV002 Breaks\DCDIV.txt" 'set and open file for output fNum = FreeFile() Open MyFile For Append As fNum 'write project info and then a blank line. Note the comma is required Print #fNum, strText Write #fNum, Close #fNum End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.