Aight, I got 2 forms. on each one I got a listview. (Form1 got List1 and Form2 got List2) This is wat I need.
When I press a button on Form1, it loads Form2. When Form2 loads, everything in Form1.List1 goes to Form2.List2. When Form2.List2 is unloaded, everything in List2 goes to List1.
Help?
For I = 1 to Form1.Listview1.Listitems.Count
Form2.Listview2.Listitems.Add I
Next I
Wtf?
Private Sub Form_Load()
For i = 1 To Form1.ChannelList.ListItems.Count
Rechlist.ChannelList.ListItems.add i
Next i
It highlights " i " and sais, " Variable Not Defined "
If I type in " Dim i As String ", it highlights " i " and sais, " Type Missmatch "
Dono why it does this.
Help?
Dim I as Integer
Edit * The code supplied MAY NOT be everything u need to accomplish your task but just an idea you can use to further implement what your looking to do.
Also seeing how u didnt know how to declare an integer im suggesting you go off and actually learn Visual Basic
Quote from: NuLL on December 22, 2003, 04:32 PM
... actually learn Visual Basic
There is no way you can Learn Vb. There are about a billion parts of it.
Im open for suggestions.
Jump of a cliff
Quote from: OuTLawZGoSu on December 22, 2003, 04:45 PM
Quote from: NuLL on December 22, 2003, 04:32 PM
... actually learn Visual Basic
There is no way you can Learn Vb. There are about a billion parts of it.
Im open for suggestions.
You can't learn vb?...hmm, interesting theory.
Quote from: OuTLawZGoSu on December 22, 2003, 04:45 PM
There is no way you can Learn Vb. There are about a billion parts of it.
So you've counted them all...interesting. I'm sure if you have that much time on your hands you can learn the language as well.
Aight, don't post if it ain't useful.
Quote from: OuTLawZGoSu on December 22, 2003, 04:45 PM
there is no way you can Learn Vb. There are about a billion parts of it.
Im open for suggestions.
take some of your own advice
Quote from: OuTLawZGoSu on December 22, 2003, 04:02 PM
Aight, I got 2 forms. on each one I got a listview. (Form1 got List1 and Form2 got List2) This is wat I need.
When I press a button on Form1, it loads Form2. When Form2 loads, everything in Form1.List1 goes to Form2.List2. When Form2.List2 is unloaded, everything in List2 goes to List1.
Help?
Hope this helps.
under
Public sub YourButton_click
Dim i As Integer
For i = 1 To List1.ListItems.Count
Form2.List2.ListItems.Add , , List1.ListItems(i).Text
Next i
Form2.Show
end sub
'Form2 unload
Private Sub Form_Unload(Cancel As Integer)
Dim i As Integer
For i = 1 To List2.ListItems.Count
Form1.List1.ListItems.Add , , List2.ListItems(i).Text
Next i
End Sub
Edit: (Grok) Added indentions. If ListView is 0-based, you'll want to go For i = 0 to ListItems.Count - 1 as well. I don't remember at the moment and haven't time to look it up.