'Comma, ')' or valid expression continuation expected'

Discussion in 'Code Snippets and Tutorials' started by chelsea1, Mar 31, 2008.

  1. chelsea1

    chelsea1 Level IV

    Joined:
    Nov 26, 2006
    Messages:
    2,538
    Likes Received:
    31
    Location:
    London
    why do i get that error message with this line of code

    Code (Text):
    1. <div class="text" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">lstLog.Items.Add("SponserArray[" & i & "] := '"& 1stLinks.items.item(i).ToString & "';")</li></ol></div>
    thanks

    chelsea1
     
  2. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    don't see anything wrong with this... the only thing I can see is you're using a "1" instead of a "L" in 1stLinks.items.item. But if that's really a "1" you need, then I don't see why you're getting this error.
    anyway, that's the error message I get when I misspell something.
     
  3. chelsea1

    chelsea1 Level IV

    Joined:
    Nov 26, 2006
    Messages:
    2,538
    Likes Received:
    31
    Location:
    London
    thanks tharoux, that was my problem, they look so similar in vb

    Edit: why when i use this function does it not save? all it does is open up the normal save thing and then when i click save it does nothing (expect close)

    Code (Text):
    1. <div class="text" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">Private Sub cmdSaveLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSaveLog.Click</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; SaveList(lstLog)</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; End Sub</li></ol></div>