Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Set Textbox on a Form to Deafault | New Users to Excel | |||
Help using value in a Form TextBox | Excel Programming | |||
Textbox in user form | Excel Programming | |||
TextBox on a Form How do I.......? | Excel Programming | |||
textbox on form | Excel Programming |