selected insert module
If you actually did the above step (from the list of steps you showed us),
then you put your code in the wrong location... you need to put that code
(which is event code, not a macro) in the ThisWorkbook module. To get to
this module, go into the
VB editor and look at the Project window (it is the
one that lists all your worksheets... the last item in the worksheet list
should say ThisWorkbook... double click that item to open its window and
then copy/paste your code into that window (don't forget to delete the code
from the module you originally inserted or you will get a duplicate
definition error). Now when you open the workbook, your code will run
automatically.
--
Rick (MVP - Excel)
"Marilyn" wrote in message
...
Hello I want to keep track of the people who open a workbook. I added
the following code to the workbook module
this is what I did it
right clicked on the worksheet
view code
selected insert module
this is the code , that I copied from a book
Private Sub Workbook_Open()
Open ThisWorkbook.Path & "\usage.log" For Append As #1
Print #1, Application.UserName, Now
Close #1
End Sub
I made a change to the file and saved the file . then I opened the file
again but I do not know how to view the usage log.
The instructions tell me that the file is stored in the workbook's
directory, and it is named usage.log.
How do I access the workbooks directory.
thanks