+ Reply to Thread
Results 1 to 2 of 2

Squares

  1. #1
    MSL
    Guest

    Squares

    Whenever i copy text from a text box to a cell, all new lines appear with a
    square at the end of it. Anyone know how to stop these squares from
    appearing.
    Many thanks,

  2. #2
    Gareth
    Guest

    Re: Squares

    I suspect this is because the new lines in the textbox are created with
    a carriage return and line feed (CHR(13) & CHR(10)) whereas the Excel
    cells just use a line feed (CHR(10)). (Although I can't recreate the
    problem you experience manually.)

    You can clean out the CHR13s by using Replace e.g.
    cells("A1") = replace(cells("A1"),vbcr,"")

    Replace is only available in Excel 2000 and greater. (You can use athe
    worksheet function replace if you're running XL97).

    Note however you don't need to do this if you don't copy text and use
    code such as:
    Cells(1, 1) = TextBox3.Text
    to place the text directly in a cell.

    HTH,
    Gareth

    MSL wrote:
    > Whenever i copy text from a text box to a cell, all new lines appear with a
    > square at the end of it. Anyone know how to stop these squares from
    > appearing.
    > Many thanks,


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1