VBA to assign Tick-mark to a cell & if cell value changes, Tick-mark changes to red

rtehlan

New Member
Joined
Mar 23, 2017
Messages
19
Hi,

I am looking for update on the below VBA code so that it also adds up a small green tick-mark in the cell & it changes color to red if the value of the cell changes.

Thank you for any help on this.

I am an accountant & tracking changes which have been already finalized is a big nightmare, by this i can easily see if any amounts have changed since i signed off last time.

The previous code is pasted below, This adds up a comment to the cell with the cell value, Username & date.

Sub AddPreparationComment()

Dim vCellValue As Variant
Dim sText As String

vCellValue = ActiveCell.Value
If IsNumeric(vCellValue) Then
vCellValue = CDbl(vCellValue)
End If

sText = Application.UserName & ":" & vbCrLf & vbCrLf
sText = sText & "Value at Prep: " & Format(vCellValue, "#,##0") & "" & vbCrLf
sText = sText & "Date: " & Format(Date, "m/dd/yyyy")

With ActiveCell
.ClearComments
With .AddComment
.Text sText
With .Shape
.TextFrame.Characters(1, InStr(sText, ":")).Font.Bold = msoTrue
.Width = 120
.Height = 50
End With
End With
End With

End Sub
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,215,332
Messages
6,124,314
Members
449,153
Latest member
JazzSingerNL

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top