Results 1 to 6 of 6

Thread: Multiple text boxes to string [RESOLVED]

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2003
    Location
    Liverpool UK
    Posts
    44

    Resolved 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.

  2. #2
    New Member
    Join Date
    Nov 2004
    Posts
    3
    VB Code:
    1. Dim strVar As String
    2.  
    3. strVar = text1.Text & text2.Text & text3.Text

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2003
    Location
    Liverpool UK
    Posts
    44
    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

  4. #4
    Hyperactive Member mudfish's Avatar
    Join Date
    Feb 2004
    Location
    Chit Chat
    Posts
    353
    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

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2003
    Location
    Liverpool UK
    Posts
    44
    Thanks Mudfish and Ptblank

    That is working now, I misread Ptblank's post .

    Thanks again

    Scouse

  6. #6
    Hyperactive Member mudfish's Avatar
    Join Date
    Feb 2004
    Location
    Chit Chat
    Posts
    353

    Resolved

    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
  •  



Click Here to Expand Forum to Full Width