Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Form Textbox Mulitline question

I am using a form to enter data into a cell in another sheet.
The form Textbox has mulitline enabled. It works fine, however:
When there is more than 1 line of text needed, the user hits the Enter Key
on the keyboard, to naviaget to the next line.
All looks well on the form, but when the data is produced on the sheet, each
Enter Key used places a small square Box(charater) in the cell with
multiline enabled.

The lines of text do move to the next line as required, but they have the
small square box as the last charater.
Is there any way to not display the small square box character in the cell?
Like a lkine of code that removes the character, but still maintaining the
correct multiline format?

Corey....


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Form Textbox Mulitline question

You could provide a macro that replaces the carriage return with nothing.

worksheets("Sheet1").range("A1").value _
= replace(me.textbox1.text, vbcr, "")

The textbox contains a carriage return and line feed. The line feed (chr(10) or
vblf) should be kept to force a new line within the cell, right?



"Corey ...." wrote:

I am using a form to enter data into a cell in another sheet.
The form Textbox has mulitline enabled. It works fine, however:
When there is more than 1 line of text needed, the user hits the Enter Key
on the keyboard, to naviaget to the next line.
All looks well on the form, but when the data is produced on the sheet, each
Enter Key used places a small square Box(charater) in the cell with
multiline enabled.

The lines of text do move to the next line as required, but they have the
small square box as the last charater.
Is there any way to not display the small square box character in the cell?
Like a lkine of code that removes the character, but still maintaining the
correct multiline format?

Corey....


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Form Textbox Mulitline question

ps.

Replace was added in xl2k. You could use application.substitute if you're using
xl97.

"Corey ...." wrote:

I am using a form to enter data into a cell in another sheet.
The form Textbox has mulitline enabled. It works fine, however:
When there is more than 1 line of text needed, the user hits the Enter Key
on the keyboard, to naviaget to the next line.
All looks well on the form, but when the data is produced on the sheet, each
Enter Key used places a small square Box(charater) in the cell with
multiline enabled.

The lines of text do move to the next line as required, but they have the
small square box as the last charater.
Is there any way to not display the small square box character in the cell?
Like a lkine of code that removes the character, but still maintaining the
correct multiline format?

Corey....


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Form Textbox Mulitline question

Perfect!

Thanks Dave.


"Dave Peterson" wrote in message
...
You could provide a macro that replaces the carriage return with nothing.

worksheets("Sheet1").range("A1").value _
= replace(me.textbox1.text, vbcr, "")

The textbox contains a carriage return and line feed. The line feed
(chr(10) or
vblf) should be kept to force a new line within the cell, right?



"Corey ...." wrote:

I am using a form to enter data into a cell in another sheet.
The form Textbox has mulitline enabled. It works fine, however:
When there is more than 1 line of text needed, the user hits the Enter
Key
on the keyboard, to naviaget to the next line.
All looks well on the form, but when the data is produced on the sheet,
each
Enter Key used places a small square Box(charater) in the cell with
multiline enabled.

The lines of text do move to the next line as required, but they have the
small square box as the last charater.
Is there any way to not display the small square box character in the
cell?
Like a lkine of code that removes the character, but still maintaining
the
correct multiline format?

Corey....


--

Dave Peterson



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
Set Textbox on a Form to Deafault John Calder New Users to Excel 7 July 28th 09 01:39 AM
Help using value in a Form TextBox Ayo Excel Programming 0 September 8th 07 07:14 PM
Textbox in user form Curt Excel Programming 2 February 20th 07 12:45 AM
TextBox on a Form How do I.......? Casey[_15_] Excel Programming 2 February 19th 05 09:34 PM
textbox on form Glenn Robertson Excel Programming 1 March 4th 04 11:29 AM


All times are GMT +1. The time now is 06:33 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"