For some reason, when i use the following line of code
VB Code:
Dim SelectedComputers() as String ... clstAddresses.CheckedItems.CopyTo(SelectedComputers, 0)
I get an error saying that the Object reference is not set to an instance of an object. Now the most confusing part about it is that i have other code that is used before it that works fine
VB Code:
If clstAddresses.CheckedItems.Count = 0 Then
I have another prog that uses code like the first code sample that works fine but that one doesn't. The only thing i can think of is that it must have something to do with the inherited forms feature, but the control is local to that form and anything else but the copyto thing seems to work fine. Any Ideas?




Reply With Quote