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
|Unable to open excel in 2016 is slow||4||21|
|Hiding column macro||10||28|
|Manually enter date in datepicker||24||32|
|what is Visual Studio Tools for Office Runtime Redistributable||2||14|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
20 Experts available now in Live!