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
Printable View
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
VB Code:
Dim strVar As String strVar = text1.Text & text2.Text & text3.Text
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
This should be like this.
DATASTRING = Text1.Text And Text2.Text And Text3.Text
like this
DATASTRING = Text1.Text & Text2.Text & Text3.Text
Thanks Mudfish and Ptblank
That is working now, I misread Ptblank's post .
Thanks again
Scouse
Edit you first post with resolved in the title and click the check.
PS Your welcome