Adding Cell Comments from TextBox entry

  • Thread starter Thread starter excelnut1954
  • Start date Start date
E

excelnut1954

Here is one I can't find any info on. In a UserForm, the user has the
option of entering text in TextBox7 to be entered as Cell Comments.
Let's say that this text would be entered to the named range
"CellComment".

Anybody know how this would be done?

Thanks,
J.O.
 
If your textbox is named "TextBox1" and is on "UserForm1", and you wish
the contents to be used as a comment in cell B5 then use the code:

Range("B5").AddComment (TextBox1.Value)
 
Thanks Tom. Works real well. Learned alot today. Especially since this
isn't my main job. I appreciate your simplicity, and your time.

Thanks JakeyC. The 2 lines of code seem to do the same thing, yet
they are different. A couple years, and I may learn enough to know why.

Thanks guys
J.O.
 
My method is an older method. The nice thing about it is it works even if a
comment already exists.
 
Back
Top