Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Userform text box

Kimberly,

Try one of the following:

If you're using xl2k or above, you can use:
TextBox1.Value = Replace(TextBox1.Value,Chr(10),"")

If xl97 or below:
TextBox1.Value = Application.Substitute(TextBox1.Value,Chr(10),"")

You can replace the "" with a " " if you want a space in there instead.

John

KimberlyC wrote:

Hi
I have a user form that has a text box to allow a user to enter a memo in
it. It's set to be mutliple lines and the enter key cursors to the next line
when pressed. I then have a command button that has code attached to it
that takes the text entered in the text box and places it in a range on a
worksheet.

This works well, however, there are characters at the end of each line in
the transferred text on the worksheet that looks like a sqaure box..
How do I get the text from the user from textbox to the worksheet without
those added characters at the end of each line (the character appears to be
from the user pressing the enter key to move to the next line)?

Thanks in advance!!
Kimberly


Reply
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
UserForm text will not wrap pgarcia Excel Discussion (Misc queries) 1 September 11th 07 11:44 PM
Userform / Text Box problems. PW11111 Excel Discussion (Misc queries) 1 December 20th 06 12:02 PM
Userform List box to Text Box hazel Excel Discussion (Misc queries) 1 September 16th 06 07:05 PM
format userform text box Zygan Excel Discussion (Misc queries) 3 July 12th 06 03:25 PM
How to get User input from Userform Text box K[_3_] Excel Programming 1 September 9th 03 10:08 PM


All times are GMT +1. The time now is 10:46 PM.

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

About Us

"It's about Microsoft Excel"