|
-
Dec 5th, 2000, 03:53 PM
#1
Hi
Does this exist
A text box which you can enter multiple lines of text but have VB notice them as seperate lines of text or text boxes.
1 line one text
2 line two text
etc.
Thanks in advance
Oakey
-
Dec 5th, 2000, 04:14 PM
#2
SPlit
You will have to dump it into an array...using Split()
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Dec 5th, 2000, 04:27 PM
#3
How
Hi
Thanks for that, do you happen to know any code for that.
Thanks verymuch for that.
Oakey
-
Dec 5th, 2000, 04:34 PM
#4
PowerPoster
Code:
Private Sub Form_Load()
Dim test As String
Dim a() As String
Dim i As Integer
test = "Hello World, It Works"
a = Split(test)
For i = LBound(a) To UBound(a)
MsgBox a(i)
Next
End
End Sub
-
Dec 5th, 2000, 04:58 PM
#5
_______
<?>
Code:
Private Sub Command1_Click()
'contents of text1
'1 line one text
' 2 line two text
Dim sString As String
Dim sVar
sString = Text1
sVar = Split(sString, vbCrLf)
MsgBox sVar(0) '= 1 line one text
MsgBox sVar(1) '= 2 line two text
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Dec 5th, 2000, 05:12 PM
#6
Excel
Hi Lethal
That works great but forgive me i'am very new to VB, and i cant seem to work out how to integrate that code to my program.
All the program does is export text boxes and dumps them into excel to various defined cells, the only problem is that most text boxes are only small with the exception of one, which is not masive.
is it possible to do this
Thanks in advance
Mark
-
Dec 5th, 2000, 05:16 PM
#7
_______
<?>
Lethals code is not splitting lines it is splitting words.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Dec 5th, 2000, 05:57 PM
#8
PowerPoster
Your right HeSaidJoe, I just threw in a few lines of code to show him some of the split functionality. Oakey, use HeSaidJoe's code, the only difference is the vbCrlf. I'm not sure on how to interface with excel, never messed with excel and vb together.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|