...

View Full Version : Option Strict On disallows late binding.



binici
03-01-2007, 01:52 AM
What am i doing incorrectly?

Dim Results As Array
Dim strDoorsWindow As String

Results = Split(strPatioChar, ",")

For i = 0 To UBound(Results) - 1

For Each li In patio_characteristics.Items

If li.Text = Results(i) Then

li.Selected = True

Exit For

End If

Next

Next



Thanks for the help.

nikkiH
03-01-2007, 03:18 PM
Any reason you're not using ArrayList and Contains instead of looping like that? Seems like you're just trying to check for a value in a list.

As to "wrong", are you getting an error? What is the exact error message?

binici
03-03-2007, 12:41 AM
Any reason you're not using ArrayList and Contains instead of looping like that? Seems like you're just trying to check for a value in a list.

As to "wrong", are you getting an error? What is the exact error message?

Ya, I am silly, I set Results to:

Dim Results() As String, so now the the whole String is a string and not setting it to an array object.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum