Results 1 to 11 of 11

Thread: String and text box

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    If I would like to assign the value of a text box text's property to a string how owuld I do it?

    Example:

    dim str as string

    str = text1.text

    is this correct?

  2. #2
    Member
    Join Date
    May 2000
    Location
    Canada
    Posts
    52
    that's good

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    What I am doing is the following:

    Dim strname As String
    Dim strid As String

    strid = txtemail.Text
    strname = txtNameofDoc.Text

    'Loadline$ = "g:\digisend\mailto.exe -u digisend -h dshs.wa.gov -m test -d [email protected] -s Test"

    Loadline$ = "g:\digisend\mailto.exe -u digisend -h dshs.wa.gov -m test -d strid -s strname"

    Shell Loadline$

    In the first loadline statement I am hardcoding in the values. In the second I am trying to use the text properties to get the information. It is not working the second way. Any ideas?

  4. #4
    Member
    Join Date
    May 2000
    Location
    Canada
    Posts
    52
    Loadline$ = "g:\digisend\mailto.exe -u digisend -h dshs.wa.gov -m test -d " & strid & "-s " & strname


  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    It did not work, should I put everything in () or should I maybe try putting everything between ""'s? What do you think?

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    Another thing to wonder...Does DOS take string values. I aknow that this should be an obvious yes but I am willing to try anything.

  7. #7
    Member
    Join Date
    May 2000
    Location
    Canada
    Posts
    52
    Put a breakpoint in, and in the immediate window type Print LoadLine$. Make sure it is in the right format. Taking a second look at the string I think you may need to put a space in before the -s.
    Loadline$ = "g:\digisend\mailto.exe -u digisend -h dshs.wa.gov -m test -d " & strid & " -s " & strname
    ' ^

  8. #8
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373

    Talking Excuse me

    Hi,
    Just an observation...

    Why don't verify that the string Loadline$ has all the text
    after the concatenation, and the concatenation with the Ampersand (&) was successfull?

    Just sending to a text box will be enough.

    And one more thing i like to be short with things and
    when you referr to a textbox it's not necessary to put the
    .text of it, it will take as default the content of .text like
    this: Str=Text1 equals to Str=Text1.Text

    Well, it works for me.

    Saludos...



    OOOPSSSSS.....!!!!
    I think i sleep before sending my comment... Sorry


    [Edited by D12Bit on 11-15-2000 at 09:08 PM]
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    I am not sure I understand you comment?

  10. #10
    Member
    Join Date
    May 2000
    Location
    Canada
    Posts
    52
    Paste this in. It produces the string that you wanted.

    loadline$ = "g:\digisend\mailto.exe -u digisend -h dshs.wa.gov -m test -d " & strid & " -s " & strname

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    It worked, I was looking at it and I probably figured it out right when you did. The space at the end???? Anyway, thank you very much.

    Brian

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