How can I store an old value as comment using VBA?
Hi,
I am trying to make an excel spreadsheet which will retain the value of the cell as comment when new values are inputted.
I know on excel this is possible and I found the following off the internet.
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'copy previous value to another sheet
Sheet2.Range(Target.Address) = Target
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
'//clearing more than one cell causes an error
On Error Resume Next
'//(can't overwrite an existing comment)
Target.ClearComments
With Target
'get the previous value when value changes
.AddComment
.Comment.Visible = False
.Comment.Text Text:="Previous value = " & Sheet2.Range(Target.Address)
End With
End Sub
Is this possible with VBA on ZOHO?
FYI I have a very cursory understanding of VBA.
Thanks,