Results 1 to 10 of 10

Thread: vb6 code help....

  1. #1

    Join Date
    Jun 2013
    Gender
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Time Online
    27 m
    Avg. Time Online
    N/A
    Rep Power
    0

    Angry vb6 code help....

    Block If without End If

    i cannot seem to find the problem



    Public Sub SaveData(LV As ListView, FilePath As String)
    Dim l As Long, intFF As Integer
    intFF = FreeFile
    With LV
    If .ListItems.Count > 0 Then



    Open FilePath For Append As #intFF
    For l = 1 To .ListItems.Count
    Print #intFF, .ListItems(l).Text & ";" & .ListItems(l).SubItems(1) & .ListItems(1).SubItems(2) & ";" & .ListItems(1).SubItems(3) & ";" & .ListItems(1).SubItems(4) & ";" & .ListItems(1).SubItems(5)


    Close #intFF
    End If

    End With

    End Sub

  2. #2
    Banned
    Join Date
    Jun 2012
    Gender
    Location
    90 90
    Age
    31
    Posts
    1,714
    Thanks
    876
    Thanked 2,877 Times in 1,139 Posts


    Downloads
    44
    Uploads
    1
    Mentioned
    562 Post(s)
    Time Online
    118 d 6 h 45 m
    Avg. Time Online
    1 h 30 m
    Rep Power
    0
    Gamer IDs

    Gamertag: DarkByt3 PSN ID: raredaredevil
    You forgot Next l before End If

  3. #3

    Join Date
    Jun 2013
    Gender
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Time Online
    27 m
    Avg. Time Online
    N/A
    Rep Power
    0
    Quote Originally Posted by raredaredevil View Post
    You forgot Next l before End If
    i have tried this and still wont work.....

  4. #4
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14

  5. #5

    Join Date
    Dec 2011
    Gender
    Posts
    143
    Thanks
    3
    Thanked 161 Times in 44 Posts


    Downloads
    14
    Uploads
    9
    Mentioned
    64 Post(s)
    Time Online
    5 d 21 h 53 m
    Avg. Time Online
    4 m
    Rep Power
    7
    Quote Originally Posted by dontplay View Post
    i have tried this and still wont work.....
    What error are you getting with the Next l, it worked for me?

  6. #6
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    Perhaps OP should loop from 0 to .ListItems.Count - 1 ?

  7. The Following User Says Thank You to Zachafer For This Useful Post:

    DarkByte (06-19-2013)

  8. #7
    Banned
    Join Date
    Jun 2012
    Gender
    Location
    90 90
    Age
    31
    Posts
    1,714
    Thanks
    876
    Thanked 2,877 Times in 1,139 Posts


    Downloads
    44
    Uploads
    1
    Mentioned
    562 Post(s)
    Time Online
    118 d 6 h 45 m
    Avg. Time Online
    1 h 30 m
    Rep Power
    0
    Gamer IDs

    Gamertag: DarkByt3 PSN ID: raredaredevil
    That would not error though just loop 1 less than it should but yeah he should.

    .count starts from 1
    .index starts from 0

  9. #8
    Little Brother


    Zachafer's Avatar
    Join Date
    Dec 2011
    Gender
    Posts
    1,206
    Thanks
    723
    Thanked 1,392 Times in 651 Posts


    Downloads
    81
    Uploads
    17
    Mentioned
    497 Post(s)
    Time Online
    21 d 17 h 32 m
    Avg. Time Online
    16 m
    Rep Power
    14
    Quote Originally Posted by raredaredevil View Post
    That would not error though just loop 1 less than it should but yeah he should.
    english please?

  10. #9
    Banned
    Join Date
    Jun 2012
    Gender
    Location
    90 90
    Age
    31
    Posts
    1,714
    Thanks
    876
    Thanked 2,877 Times in 1,139 Posts


    Downloads
    44
    Uploads
    1
    Mentioned
    562 Post(s)
    Time Online
    118 d 6 h 45 m
    Avg. Time Online
    1 h 30 m
    Rep Power
    0
    Gamer IDs

    Gamertag: DarkByt3 PSN ID: raredaredevil
    What part are you struggling with , He said his ide is giving him an error. The ide would not error for that reason.

  11. #10

    Join Date
    Dec 2011
    Gender
    Posts
    143
    Thanks
    3
    Thanked 161 Times in 44 Posts


    Downloads
    14
    Uploads
    9
    Mentioned
    64 Post(s)
    Time Online
    5 d 21 h 53 m
    Avg. Time Online
    4 m
    Rep Power
    7
    Quote Originally Posted by raredaredevil View Post
    What part are you struggling with , He said his ide is giving him an error. The ide would not error for that reason.
    Which is why I asked what error the dontplay is getting now.

  12. The Following User Says Thank You to Soredavide For This Useful Post:

    Zachafer (06-22-2013)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •