Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2006
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Option Strict On disallows late binding.

    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.

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    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?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    New Coder
    Join Date
    Mar 2006
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by nikkiH View Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •