Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Previous data in a comment
I use the codes below to track versions (put the previous data in a
comment). But it only works for direct entry (directly typing data into a cell). Is it possible to do the same thing for formula-generated entry? Thanks in advance Option Explicit Public acVal Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim ThisChange ThisChange = Now() On Error Resume Next Target.AddComment Target.Comment.Text "Before you make this change on " & ThisChange & ", the value was " & acVal Target.Comment.Shape.TextFrame.Characters(67).Font .Color = RGB(255, 0, 0) Target.Comment.Shape.TextFrame.Characters(1).Font. Size = 10 End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If ActiveCell.Address < Target.Address Then Exit Sub If Target.Value = "" Then acVal = "" Else acVal = Target.Value End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Want previous years data to drop off as I enter current year data | Charts and Charting in Excel | |||
3-Color Scale Vlookup for Current Month/Previous/Pre-Previous | Excel Discussion (Misc queries) | |||
copy comment content to cell content as data not as comment | Excel Discussion (Misc queries) | |||
Copy old Data from web query while keeping previous days data | Excel Worksheet Functions | |||
updating of data without overwriting the previous data updated | Excel Programming |