|
-
Mar 31st, 2005, 10:11 AM
#1
Thread Starter
New Member
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:
Private Sub addButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addButton.Click
' Adds a new movie categroy to the category list.
With movieCategoryComboBox
' Test for blank input.
If .Text <> "" Then
' Make sure the item is not already selected.
Dim itemFoundBoolean As Boolean
Dim itemIndexInteger As Integer
Do Until itemFoundBoolean Or itemIndexInteger = movieCategoryComboBox.Items.Count
If .Text = [U].Items(itemIndexInteger).ToSting()[/U] Then
itemFoundBoolean = True
End If
itemIndexInteger += 1
Loop
If itemFoundBoolean Then
MessageBox.Show("Duplicate Item", "Add Failed")
Else
' If it's not in the list then add it.
.Items.Add(.Text)
.Text = ""
End If
Else
MessageBox.Show("Enter a Movie Category To Add", "Missing Data", _
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
.Focus()
End With
End Sub
I have underlined were the error is.
-
Mar 31st, 2005, 11:16 AM
#2
Frenzied Member
Re: Late Binging Error
"ToSting" ??? How about "ToString" ???
Blessings in abundance,
All the Best,
& ENJOY!
Art . . . . Carlisle, PA . . USA
-
Mar 31st, 2005, 11:18 AM
#3
Frenzied Member
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
-
Apr 2nd, 2005, 12:07 PM
#4
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|