Results 1 to 2 of 2

Thread: why can't I use array directly as value?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    Hi,

    I have the following code:

    Code:
    '-- remove from current view
       For l = 0 To UBound(sKeys)
           nSelected = sKeys(l)
           ListView(iListView).ListItems.Remove nSelected
       Next l
    The above works perfect.. But what I'm wondering is, why won't the following work, using the array directly:

    Code:
    '-- remove from current view
       For l = 0 To UBound(sKeys)
           ListView(iListView).ListItems.Remove sKeys(l)
       Next l
    It tells me "Element Not Found". It seems that even though sKeys(l) equals the correct item index, it doesn't like me to use it directly without converting it to another variable such as nSelected first..

    Any idea why I can't use the sKeys(l) direclty?

    Thanks,

    Dan

  2. #2

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