I have a schedule for 80 people on a worksheet. It is send out periodically
by email. Employees need to know they have today's most currrent schedule
so I want to include a version history in another worksheet in the file.
Entries into this version history log would be automatically created each
time the scheduler saves the file. The employee can just click on the
worksheet tab named in all likelihood "version" and they can see a log with
columns and data such as:
Filename, version, Updated By
schedule.xls, version 2004.02.14.1601 (year.month.date.military time),
updated by "rayscar"
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim rng as Range
With worksheets("Version")
set rng = .cells(rows.count,1).End(xlup)(2)
End With
rng.Value = Thisworkbook.name
rng.offset(0,1).Value = "Version " & format(yyyy.mm.dd.hhmm)
rng.offset(0,2).Value = "updated by ""rayscar"""
End Sub
I don't see a ThisWorkbook module. I see ThisWorkbook under Microsoft Excel
Objects. Is this latter location where the code goes? It just gets pasted
in there, right? Sorry, I'm still learning this.
I don't see a ThisWorkbook module. I see ThisWorkbook under Microsoft Excel
Objects. Is this latter location where the code goes? It just gets pasted
in there, right? Sorry, I'm still learning this.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.