|
-
Dec 2nd, 2004, 10:45 AM
#1
Thread Starter
Member
Multiple text boxes to string [RESOLVED]
Hi ALL
I wonder if someoone can help me. I have 3 text boxes and I am trying to pass there values to a string can anybody please tell me if this is possible. I cannot seem to get the syntax right.
Thanks
Scouse
Last edited by scouse; Dec 2nd, 2004 at 11:27 AM.
-
Dec 2nd, 2004, 10:49 AM
#2
New Member
VB Code:
Dim strVar As String
strVar = text1.Text & text2.Text & text3.Text
-
Dec 2nd, 2004, 11:06 AM
#3
Thread Starter
Member
Hi Ptblank
Thanks for you reply, that is what I thought but I am getting a type mismatch error.
My code is as follows
text1.text = ""
text2.text= "4145.5"
text3.text= ""
Public Sub MAKESTRING()
Dim DATASTRING As String
DATASTRING = Text1.Text And Text2.Text And Text3.Text
End Sub
I cannot understand why I am getting this error.
Thanks
Scouse
-
Dec 2nd, 2004, 11:14 AM
#4
Hyperactive Member
This should be like this.
DATASTRING = Text1.Text And Text2.Text And Text3.Text
like this
DATASTRING = Text1.Text & Text2.Text & Text3.Text
Mudfish AKA Bowfin
I can spell "If" all day right, just a coder!
"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut." -- Ernest Hemingway
Member of the ECCC

-
Dec 2nd, 2004, 11:19 AM
#5
Thread Starter
Member
Thanks Mudfish and Ptblank
That is working now, I misread Ptblank's post .
Thanks again
Scouse
-
Dec 2nd, 2004, 11:22 AM
#6
Hyperactive Member
Edit you first post with resolved in the title and click the check.
PS Your welcome
Mudfish AKA Bowfin
I can spell "If" all day right, just a coder!
"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut." -- Ernest Hemingway
Member of the ECCC

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
|