I posted a question recently on how to format the first part of text from a input box and append it to existing text in a cell.
So for example if I have a cell with... this
23/08/2013: Hi there how are you today
24/08/2013: Customer is feeling good today
and I double click the cell, I get an input box to enter a comment. I take the comment.. add todays date to it in the VBA code and then append and format it to the existing code using this
If Target.Column = NOTES_COL Then 'Add a note
lngPos = Len(Target.Text)
strNote = InputBox(Prompt:="Enter Note", _
Title:="Notes", Default:="")
If (Len(Trim(strNote)) > 0) Then
If Target.Value = "" Then
Target.Font.Bold = False
newVal = Date & ": " & strNote
Else
newVal = Chr(10) & Date & ": " & strNote
End If
Target.Characters(Start:=lngPos + 1).Text = newVal
Target.Characters(Start:=lngPos + 1, Length:=11).Font.Bold = True
End If
End If
So basically this takes a comment... adds a date to the comment, and a new line and then appends it to the existing characters and formats the date Bold.
This all works fine until I go over 255 Characters, which the poster that helped me in the last solution warned about, but I thought it was trying to insert one comment > 255 and not the entire cell lenght.
How do I get around this... as I can add mulitple comments into a cell
regards Mick