Prev: Cell Referencing
Next: Autofilter header row
From: Rich on 10 Apr 2010 04:42 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
From: ozgrid.com on 10 Apr 2010 05:17 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" <REPLACEWITHrich(a)richdavies.com> wrote in message news:yRWvn.213698$K81.200738(a)newsfe18.iad... >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 > >
From: Mike H on 10 Apr 2010 05:31 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 > > > . >
From: Mike H on 10 Apr 2010 05:36 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 > > > > > > . > >
From: Chip Pearson on 10 Apr 2010 15:57 See http://www.cpearson.com/Excel/TrackingWorkbookOpens.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" <REPLACEWITHrich(a)richdavies.com> 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?
|
Pages: 1 Prev: Cell Referencing Next: Autofilter header row |