Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i count everytime a spreadsheet is opened nipper Excel Discussion (Misc queries) 1 March 15th 07 05:23 PM
increasing a value everytime excel is opened? chris leight Excel Worksheet Functions 1 February 22nd 06 03:59 AM
Link not updated everytime spreadsheet opened Olivier D. Excel Worksheet Functions 0 September 28th 05 01:48 PM
A new sequence number in file everytime it is opened Tiger Claw Excel Worksheet Functions 1 June 15th 05 03:37 PM
Possible to write VBA code to send out an EMAIL everytime a workbook is opened? Marcello do Guzman[_2_] Excel Programming 4 September 2nd 04 07:59 AM


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"