LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default transferring multiline text from userform to worksheet - line break problem

Hi all,

I have set up a program with which information on a userform is
transferred to a worksheet. I have a problem with multiline text.

For the checkbox I have set the multiline text property to "true". A
user adds an address in the textbox that consists of 4 lines. The
following macro transfers the text to a worksheet when the OK button is
pressed (it finds the last cell, picks the line below that (LR) and
prints the text on that row in the third column from the left:

Private Sub CommandButton1_Click()
Set LR = Worksheets("Deposits").Range("A65000").End(xlUp)
LR.Offset(0, 3).Value = TextBox1.Text
TextBox1.Text = ""
UserForm4.Hide
End Sub

This works like a charm, except when I look in the worksheet the text
will look like this:

(name) []
(street) []
(city, state, zip) []
(country)

The "[]" represent the little squares that indicate a line break. For
some reason I just can't seem to find a way to get rid of them.

Is there a property for the cell that will get rid of the squares, or
perhaps a macro?

A second question about this userform: is there also a way to allow a
user to rightclick and paste the address in the textbox (copied from
another application)? If I rightclick now in the textbox, nothing
happens.

Thanks so much for your help!
Paul

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transferring text from one worksheet to another txmusic Excel Discussion (Misc queries) 1 March 18th 10 02:18 AM
Force line break based on text Quizologist Excel Discussion (Misc queries) 3 June 4th 08 05:46 PM
UserForm; Textbox; Multiline; NonPrintable Characters sa3214[_2_] Excel Programming 3 November 3rd 04 03:46 PM
Copying multiline textboxes from userform to worksheet cell Leighton Harker Excel Programming 1 September 25th 04 04:14 PM
How to do a line break in a text formula TJCacher Excel Programming 2 April 13th 04 02:39 AM


All times are GMT +1. The time now is 06:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"