Originally Posted by Apps
Hi,
We do a similar thing on a number of reports and solutions used in the company I work for, so a basic code you could use would be:
[vba]xOpened$=Environ("Username") & " " & Date & " " & Time[/vba]
or
[vba]xOpened$=Environ("Username") & " " & Format(Now,"dd/mm/yyyy hh:mm")[/vba]
This second example would give you a text string of something like "RyanDale44 03/10/2008 13:58", or you could use the first example to have the components of User/Date/Time recordedly seperately.
Whatever you choose, this code is just placed in the ThisWorkbook section of the VBE as
[vba]Private Sub Workbook_Open()
'####code goes here
End Sub[/vba]
...so the code will execute when the user Opens the excel file.
The next question is now that you have the information you want - what are you going to do with it? How are you looking to collate all of these entries together to track who was using the report and when? Are you planning to use a database of some sort - Access/SQL?