#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Audit Trail

I would like to build an audit trail into a spreadsheet so that anyone who
opens the file is is logged in a worksheet with user name and time stamp.
What's the easiest / best way to achieve this?

--
Rich
http://www.rhodes-pefkos.co.uk
http://www.rhodes-lindos.co.uk


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 464
Default Audit Trail

Look into Track Changes in the Excel Help.

Or, for a VBA method;
http://www.ozgrid.com/VBA/track-changes.htm



--
Regards
Dave Hawley
www.ozgrid.com
"Rich" wrote in message
...
I would like to build an audit trail into a spreadsheet so that anyone who
opens the file is is logged in a worksheet with user name and time stamp.
What's the easiest / best way to achieve this?

--
Rich
http://www.rhodes-pefkos.co.uk
http://www.rhodes-lindos.co.uk



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Audit Trail

Rich,

Alt+F11 to open VB editor. Double click 'ThisWorkbook' and paste the code
below in on the right. It uses a worksheet called "Audit"

Private Sub Workbook_Open()
Dim LastRow As Long
Set sht = Sheets("Audit")
LastRow = sht.Cells(Cells.Rows.Count, "A").End(xlUp).Row + 1
sht.Cells(LastRow, 1) = Environ("Username")
sht.Cells(LastRow, 2) = Now
End Sub

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Rich" wrote:

I would like to build an audit trail into a spreadsheet so that anyone who
opens the file is is logged in a worksheet with user name and time stamp.
What's the easiest / best way to achieve this?

--
Rich
http://www.rhodes-pefkos.co.uk
http://www.rhodes-lindos.co.uk


.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Audit Trail

Hi,

In case the user doesn't save it may be a good idea to save it with the
openers username by making this the last line in the code

ActiveWorkbook.Save
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Mike H" wrote:

Rich,

Alt+F11 to open VB editor. Double click 'ThisWorkbook' and paste the code
below in on the right. It uses a worksheet called "Audit"

Private Sub Workbook_Open()
Dim LastRow As Long
Set sht = Sheets("Audit")
LastRow = sht.Cells(Cells.Rows.Count, "A").End(xlUp).Row + 1
sht.Cells(LastRow, 1) = Environ("Username")
sht.Cells(LastRow, 2) = Now
End Sub

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Rich" wrote:

I would like to build an audit trail into a spreadsheet so that anyone who
opens the file is is logged in a worksheet with user name and time stamp.
What's the easiest / best way to achieve this?

--
Rich
http://www.rhodes-pefkos.co.uk
http://www.rhodes-lindos.co.uk


.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Audit Trail


See http://www.cpearson.com/Excel/Tracki...bookOpens.aspx .

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com


On Sat, 10 Apr 2010 09:42:09 +0100, "Rich"
wrote:

I would like to build an audit trail into a spreadsheet so that anyone who
opens the file is is logged in a worksheet with user name and time stamp.
What's the easiest / best way to achieve this?

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
Leading zero's trail Number C-Breeze Excel Worksheet Functions 3 April 7th 10 05:26 AM
Excel 2007 'Trail" KLong Excel Discussion (Misc queries) 1 March 10th 10 05:11 PM
audit trail MIke Excel Discussion (Misc queries) 4 February 27th 08 12:11 AM
Audit Trail Pendelfin Excel Discussion (Misc queries) 1 January 23rd 06 03:04 PM
excel trail balance worksheet leeonline Excel Discussion (Misc queries) 1 January 7th 05 03:19 AM


All times are GMT +1. The time now is 11:10 PM.

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"