Ask Experts Questions for FREE Help !
Ask
    emjez15's Avatar
    emjez15 Posts: 1, Reputation: 1
    New Member
     
    #1

    Jul 5, 2008, 09:30 PM
    ListBox problem
    If lstSchedule.Items.Contains((0)) = True Then
    objWriter.WriteLine((0))
    End If
    If lstSchedule.Items.Contains((1)) = True Then
    objWriter.WriteLine((1))

    -----------------------until objWriter.WriteLine((7))---------------------

    is this correct?. because I want want the program to write if the line 1 or to line 7 exists inside the listbox, so if there's noting written in a certain line, it just bypass and continue with the code..

    I already tried this..

    If lstSchedule.Items.Contains( lstSchedule.Items(1)) = True Then objWriter.WriteLine(( lstSchedule.Items(1))

    [UNTIL ( lstSchedule.Items(7))]

    but it just continue when line 1 or to line 7 has an input..
    I want to bypass the code line if there's no input..

    thanks in advance

    :rolleyes:
    melondotnet's Avatar
    melondotnet Posts: 23, Reputation: 1
    New Member
     
    #2

    Jul 25, 2008, 09:37 AM
    Okay,

    Use a for, for starters (like the pun? )

    For val = 1 to 7
    ~~YOUR CHECK CODE HERE~~
    Next

    This will just keep running until val = 7.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.



View more questions Search