Add User to comment
I have a worksheet event that inserts a comment into a changed cell so
that it can be tracked. Multiple employees access the sheet and are free to change items and I want to hold them accountable for changes. I have: Private Sub Worksheet_Change(ByVal Target As Range) Target.Interior.ColorIndex = 0 On Error Resume Next Dim curComment As String curComment = "" curComment = Target.Comment.Text If curComment < "" Then curComment = curComment & Chr(10) Target.AddComment Target.Comment.Text Text:=curComment & _ ActiveWorkbook.BuiltinDocumentProperties("Author") & _ Chr(10) & " Rev. " & Format(Date, "yyyy-mm-dd ") & _ Format(Time, "hh:mm") ActiveCell.Comment.Visible = False 'comment perhaps should be resized End Sub How do I include the user name automatically? Perhaps insert the name that the excel workbook is regsitered to? |
All times are GMT +1. The time now is 12:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com