Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have an Excel database with data entry form that contain a multiline textbox. my problem is that the multiline information in the textbox (up to 15 lines) is copied into one multiline cell in the list, and i want the information of each line to be stored in a separated cell and row, so a 15 lines in the textbox will be stored as 15 cells. Thanks in advance Eli |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Eli,
Depending on what you want to happen if there are not 15 lines of text (either more or less): Private Sub CommandButton1_Click() Dim TempStr() As String TextBox1.Text = "Line 1" & vbNewLine & "Line 2" & vbNewLine & "Line 3" & vbNewLine & "Line 4" & vbNewLine & "Line 5" TempStr = Split(TextBox1.Text, vbNewLine) Range("A1").Resize(15).Value = Application.Transpose(TempStr) 'Or Range("A1").Resize(UBound(TempStr) + 1).Value = Application.Transpose(TempStr) End Sub NickHK "???" wrote in message ... Hi, I have an Excel database with data entry form that contain a multiline textbox. my problem is that the multiline information in the textbox (up to 15 lines) is copied into one multiline cell in the list, and i want the information of each line to be stored in a separated cell and row, so a 15 lines in the textbox will be stored as 15 cells. Thanks in advance Eli |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks very much!!!
Eli "NickHK" wrote: Eli, Depending on what you want to happen if there are not 15 lines of text (either more or less): Private Sub CommandButton1_Click() Dim TempStr() As String TextBox1.Text = "Line 1" & vbNewLine & "Line 2" & vbNewLine & "Line 3" & vbNewLine & "Line 4" & vbNewLine & "Line 5" TempStr = Split(TextBox1.Text, vbNewLine) Range("A1").Resize(15).Value = Application.Transpose(TempStr) 'Or Range("A1").Resize(UBound(TempStr) + 1).Value = Application.Transpose(TempStr) End Sub NickHK "???" wrote in message ... Hi, I have an Excel database with data entry form that contain a multiline textbox. my problem is that the multiline information in the textbox (up to 15 lines) is copied into one multiline cell in the list, and i want the information of each line to be stored in a separated cell and row, so a 15 lines in the textbox will be stored as 15 cells. Thanks in advance Eli |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textbox and multiline text | Excel Worksheet Functions | |||
User Form: Multiline textbox to multiple rows | Excel Programming | |||
Userform Textbox multiline Vs format in worksheet | Excel Programming | |||
UserForm; Textbox; Multiline; NonPrintable Characters | Excel Programming | |||
Multiline textbox.. Can you have multiple font colors within? | Excel Programming |