Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Hidden Sheet in Excel 2000

Status
Not open for further replies.

aarondewberry

IS-IT--Management
Jul 20, 2005
148
GB
All

I have an hidden sheet in Excel ("AccessSheet").
What I want to do is everytime a user accesses the workbook, I want to add, on a new row, the Environ("Username") and the date/time.

Any ideas??
 
Any time they access it, or change it or save it ?

Either way the code is the same - all that changes is where the code goes....

Code:
With sheets("AccessSheet")
    NextRow = .Cells(65536, 1).End(xlUp).Row + 1
    .Cells(NextRow, 1).Value = Environ("username")
    .Cells(NextRow, 2).Value = Now
End With

For accessing the workbook, this should go in the Workbook_OPEN event. For changes, it should go in the sheet CHANGE event. For saves, it goes in the Workbook BEFORE SAVE event...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top