someone
09-07-2003, 10:07 PM
I have a listView and this code
when i run my programe it says this error "method not alid without sutible object"
This is my code:
For Each itemNum In frmOptions.ListView2.ListItems
With itemNum
' If .Selected Then
' Form2.List1.AddItem "Selected: " & .Key & " " & .Text & " " & .SubItems(1)
' End If
If .Checked Then
Print frmOptions.ListView2.SubItems(1)
End If
End With
Next
thanks for any help.. :)
Someone
zak2zak
09-08-2003, 01:39 AM
May be this helps...
Every ListView.ListItems(?) Should Have An Index?
Print frmOptions.ListView2(?).SubItems(1)
Print ItemNum.SubItems(1) 'Direct To The Point
someone
09-08-2003, 07:44 PM
umm... an index??? Whats that??
I have tryed the code you posted and i still have the same error :(
Thanks,
Someone
zak2zak
09-09-2003, 12:31 AM
May be this helps...
ListView Is called By
ListView2.ListItems(1).Text - First Column
ListView2.ListItems(1).SubItems(1) - second Column
The 1 is the index of the row.
Dim i As Integer
For i = 1 To frmOptions.ListView2.ListItems.Count
If frmOptions.ListView2.ListItems(i).Checked Then
Print frmOptions.ListView2(i).SubItems(1) 'Print?
End If
Next
someone
09-10-2003, 12:53 AM
hmmmm...
Thanks for your help but it still coming up with the error.. :(
What does the error actually mean??
Thanks,
Someone
zak2zak
09-10-2003, 08:32 AM
What is the error message please post if u can?
The Print? where to print?
someone
09-18-2003, 04:12 PM
sorry about the late reply..
the error is "method not valid without sutible object". i dont think it has anything to do with the print thing as i have tested it without that there and a msgbox there in stead and it still stuffs up..
thanks for your help,
someone