Forum Discussion
maxwelli1970
Jun 20, 2019Copper Contributor
adding a comment to a cell from a textbox in a userform
Hi, I'm designing a simple tracking system to aid training. I have most of the form dealt with but I'm struggling with a certain component. I need a text box within the user form to input the...
Haytham Amairah
Jun 23, 2019Silver Contributor
It's fairly easy, please check out this example below and find it in the attached file.
Private Sub CommandButton1_Click()
On Error Resume Next
Dim com As String
com = TextBox1.Text
With ActiveCell
.AddComment
.comment.Visible = False
.comment.Text Text:="Input Tracking Data:" & Chr(10) & com
End With
On Error GoTo 0
End Sub
Hope that helps