Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I log everytime an excel workbook is opened?
I have user name and password applied to a workbook I'm creating. Anyone
know the basic code used to log everytime a user accesses the workbook and when? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I log everytime an excel workbook is opened?
Hi
Goes in the ThisWorkbook module of the file: Private Sub Workbook_Open() Dim iFNum As Integer iFNum = FreeFile Open "C:\Temp\Log.txt" For Append As #iFNum Print #iFNum, ThisWorkbook.FullName & " opened " & _ Now & " by " & Environ("username") & " on pc " & _ Environ("computername") Close #iFNum End Sub Change filepath to fit, it should be on a network drive with write access for everyone (a thing that doesn't seem to exist anymore in corporations...) HTH. Best wishes Harald "bmarks" skrev i melding ... I have user name and password applied to a workbook I'm creating. Anyone know the basic code used to log everytime a user accesses the workbook and when? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i count everytime a spreadsheet is opened | Excel Discussion (Misc queries) | |||
increasing a value everytime excel is opened? | Excel Worksheet Functions | |||
Link not updated everytime spreadsheet opened | Excel Worksheet Functions | |||
A new sequence number in file everytime it is opened | Excel Worksheet Functions | |||
Possible to write VBA code to send out an EMAIL everytime a workbook is opened? | Excel Programming |