Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jan 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    copy text to commentbox (Eng/Excel2000/1)

    I have a VBA program where the user can input text in a userform textbox.
    This text is copied to the commentbox using 'addcomment(textcomment.text)' .
    It works fine when no <enter> button is used in the comment text. In the latter case, a tine square box is displayed (for the linefeed/cr char?) between the lines were it was pushed.
    How can I avoid this square box?
    thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: copy text to commentbox (Eng/Excel2000/1)

    Use

    ActiveCell.AddComment Replace(TextComment.Text, vbCrLf, vbLf)

    (replace ActiveCell with the range you're applying the code to)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •