Results 1 to 4 of 4

Thread: Late Binging Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    3

    Late Binging Error

    I am sort of neww to the programming world. I am taking a VB.NET class and have a late binding error in my code. Could someone please help me find it.

    Here is my code:

    VB Code:
    1. Private Sub addButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addButton.Click
    2.         ' Adds a new movie categroy to the category list.
    3.  
    4.         With movieCategoryComboBox
    5.             ' Test for blank input.
    6.             If .Text <> "" Then
    7.                 ' Make sure the item is not already selected.
    8.                 Dim itemFoundBoolean As Boolean
    9.                 Dim itemIndexInteger As Integer
    10.                 Do Until itemFoundBoolean Or itemIndexInteger = movieCategoryComboBox.Items.Count
    11.                     If .Text = [U].Items(itemIndexInteger).ToSting()[/U] Then
    12.                         itemFoundBoolean = True
    13.                     End If
    14.                     itemIndexInteger += 1
    15.                 Loop
    16.                 If itemFoundBoolean Then
    17.                     MessageBox.Show("Duplicate Item", "Add Failed")
    18.                 Else
    19.                     ' If it's not in the list then add it.
    20.                     .Items.Add(.Text)
    21.                     .Text = ""
    22.                 End If
    23.             Else
    24.                 MessageBox.Show("Enter a Movie Category To Add", "Missing Data", _
    25.                     MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
    26.             End If
    27.             .Focus()
    28.         End With
    29.     End Sub

    I have underlined were the error is.

  2. #2
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Re: Late Binging Error

    "ToSting" ??? How about "ToString" ???
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  3. #3
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Re: Late Binging Error

    Do you have Option Explict or Option Strict turned on? If not, you should consider it.
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    3

    Re: Late Binging Error

    I found the error right after I posted the thread. I don't know why I didn't catch it before. My daughter & I have both been sick so it might have been the nightquil...

    Thank You

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