-
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
-
I can't tell for sure from your code, but it looks like sKeys(l) is a string. Try Val(sKeys(l)).