Results 1 to 15 of 15

Thread: compare variables

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    86

    Resolved compare variables

    can someone help me
    i want to create some sort of login
    this is what i have

    VB Code:
    1. Function logingo()
    2. Dim urlbestand As String
    3. Dim gegevens As String
    4. Dim splitten As String
    5. Dim splitten2 As String
    6. Dim splitten3 As String
    7. Dim splitten4 As String
    8. Dim splitten5 As String
    9. Dim bstand As Boolean
    10. Dim pathnaam As String
    11. Dim loginjuist As Boolean
    12. urlbestand = Environ("commonProgramFiles") & "\dcq369\log.dat"
    13. pathnaam = Environ("commonProgramFiles") & "\dcq369\schrfbvgdhd.dat"
    14. If Len(Dir$(urlbestand)) > 1 Then
    15. bestand = True
    16. Else
    17. MsgBox "er zijn geen personen geregistreerd", vbExclamation, "opmerking"
    18. End If
    19. If bestand = True Then
    20. Open urlbestand For Input As #1
    21. gegevens = Input(LOF(1), #1)
    22. Close #1
    23. splitten = Split(gegevens, "||")(1)
    24. splitten2 = Split(splitten, "=")(1)
    25. For i = 1 To splitten2
    26. splitten3 = Split(gegevens, "||")(i + 1)
    27. splitten4 = Split(splitten3, "&&")(0)
    28. splitten5 = Split(splitten3, "&&")(1)
    29.  [COLOR=red]
    30. MsgBox splitten4
    31. MsgBox splitten5
    32. MsgBox Text1.Text
    33. MsgBox Text2.Text
    34. [/COLOR]
    35. If splitten4 Like Text1.Text And splitten5 Like Text2.Text Then
    36. loginjuist = True
    37. Exit For
    38. Else
    39. loginjuist = False
    40. End If
    41. Next i
    42. End If
    43. If loginjuist = True Then
    44. Open pathnaam For Output As #1
    45. Print #1, "ja"
    46. Close #1
    47. progamma.Show
    48. Unload login
    49. Else
    50. MsgBox "uw gegevens zijn fout probeer opnieuw of druk op doorgaan", vbExclamation, "opmerking"
    51. End If
    52. End Function

    the message boxen in red are being compared but they are equal and the script don't seethem as equal variables what do i have to do to get them equal
    Last edited by davyquyo; Oct 19th, 2004 at 08:28 PM.

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