I'm trying to write a program to keep track of the wines in my wine racks. I want the contents of the Listbox to display the contents of the Rack chosen from a ComboBox. I've got a form with Command Buttons to add and remove from the list and add new racks to the ComboBox. Google searches weren't very helpful (most search results just showed list and combo box stuff that didn't relate to what I'm trying to do) except using an ADO database as a DataSource (which I know nothing about and would like to confirm there is no easier option before trying to figure it out)
Could someone please tell me if there is another way to display a different list for each combobox selection?
I Do have some experience writing and loading values from an excel spreadsheet. Is there a way to make the listbox display a specific row or column from a speadsheet? (Then I just have to figure out how to easily add and remove from that speadsheet (preferably without creating gaps)
The little code I have is below - Private Sub Command1_Click() 'Add to ListBox
-
List1.AddItem Text1.Text
-
Text1.Text = ""
-
End Sub
-
-
Private Sub Command2_Click() 'Remove from ListBox
-
If List1.ListIndex > -1 Then
-
List1.RemoveItem List1.ListIndex
-
End If
-
End Sub
-
-
Private Sub Command3_Click() 'Add to Combo
-
Combo1.AddItem Text2.Text
-
Text2.Text = ""
-
End Sub
-
-
Private Sub Command4_Click() 'Exit
-
End
-
End Sub
-
-
Private Sub Form_Load()
-
Combo1.AddItem "Rack 1"
-
Combo1.AddItem "Rack 2"
-
End Sub
Update if anyone is interested. I added the ability to save the listboxs to text files and load them again when form loads.
Command 1 add contents of text box to current listbox
Command 2 Removes from listbox
Command 3 saves all listboxes to text files. -
Private Sub Command1_Click()
-
If List1.Visible = True Then
-
List1.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List2.Visible = True Then
-
List2.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List3.Visible = True Then
-
List3.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List4.Visible = True Then
-
List4.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List5.Visible = True Then
-
List5.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List6.Visible = True Then
-
List6.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List7.Visible = True Then
-
List7.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List8.Visible = True Then
-
List8.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List9.Visible = True Then
-
List9.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List10.Visible = True Then
-
List10.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List11.Visible = True Then
-
List11.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List12.Visible = True Then
-
List12.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List13.Visible = True Then
-
List13.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List14.Visible = True Then
-
List14.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List15.Visible = True Then
-
List15.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List16.Visible = True Then
-
List16.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List17.Visible = True Then
-
List17.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List18.Visible = True Then
-
List18.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List19.Visible = True Then
-
List19.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List20.Visible = True Then
-
List20.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List21.Visible = True Then
-
List21.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List22.Visible = True Then
-
List22.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List23.Visible = True Then
-
List23.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List24.Visible = True Then
-
List24.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List25.Visible = True Then
-
List25.AddItem Text1.Text
-
Text1.Text = ""
-
End If
-
End Sub
-
-
Private Sub Command2_Click()
-
If List1.Visible And List1.ListIndex > -1 Then
-
List1.RemoveItem List1.ListIndex
-
ElseIf List2.Visible And List2.ListIndex > -1 Then
-
List2.RemoveItem List2.ListIndex
-
ElseIf List3.Visible And List3.ListIndex > -1 Then
-
List3.RemoveItem List3.ListIndex
-
ElseIf List4.Visible And List4.ListIndex > -1 Then
-
List4.RemoveItem List4.ListIndex
-
ElseIf List5.Visible And List5.ListIndex > -1 Then
-
List5.RemoveItem List5.ListIndex
-
ElseIf List6.Visible And List6.ListIndex > -1 Then
-
List6.RemoveItem List6.ListIndex
-
ElseIf List7.Visible And List7.ListIndex > -1 Then
-
List7.RemoveItem List7.ListIndex
-
ElseIf List8.Visible And List8.ListIndex > -1 Then
-
List8.RemoveItem List8.ListIndex
-
ElseIf List9.Visible And List9.ListIndex > -1 Then
-
List9.RemoveItem List9.ListIndex
-
ElseIf List10.Visible And List10.ListIndex > -1 Then
-
List10.RemoveItem List10.ListIndex
-
ElseIf List11.Visible And List11.ListIndex > -1 Then
-
List11.RemoveItem List11.ListIndex
-
ElseIf List12.Visible And List12.ListIndex > -1 Then
-
List12.RemoveItem List12.ListIndex
-
ElseIf List13.Visible And List13.ListIndex > -1 Then
-
List13.RemoveItem List13.ListIndex
-
ElseIf List14.Visible And List14.ListIndex > -1 Then
-
List14.RemoveItem List14.ListIndex
-
ElseIf List15.Visible And List15.ListIndex > -1 Then
-
List15.RemoveItem List15.ListIndex
-
ElseIf List16.Visible And List16.ListIndex > -1 Then
-
List16.RemoveItem List16.ListIndex
-
ElseIf List17.Visible And List17.ListIndex > -1 Then
-
List17.RemoveItem List17.ListIndex
-
ElseIf List18.Visible And List18.ListIndex > -1 Then
-
List18.RemoveItem List18.ListIndex
-
ElseIf List19.Visible And List19.ListIndex > -1 Then
-
List19.RemoveItem List19.ListIndex
-
ElseIf List20.Visible And List20.ListIndex > -1 Then
-
List20.RemoveItem List20.ListIndex
-
ElseIf List21.Visible And List21.ListIndex > -1 Then
-
List21.RemoveItem List21.ListIndex
-
ElseIf List22.Visible And List22.ListIndex > -1 Then
-
List22.RemoveItem List22.ListIndex
-
ElseIf List23.Visible And List23.ListIndex > -1 Then
-
List23.RemoveItem List23.ListIndex
-
ElseIf List24.Visible And List24.ListIndex > -1 Then
-
List24.RemoveItem List24.ListIndex
-
ElseIf List25.Visible And List25.ListIndex > -1 Then
-
List25.RemoveItem List25.ListIndex
-
End If
-
End Sub
-
-
Private Sub Command3_Click()
-
Dim fn As Long
-
Dim i As Integer
-
fn = FreeFile
-
Open "\\Remote\WeatherArray\WineRacks\WineRack1.txt" For Output As fn
-
For i = 0 To List1.ListCount - 1
-
Print #fn, List1.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack2.txt" For Output As fn
-
For i = 0 To List2.ListCount - 1
-
Print #fn, List2.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack3.txt" For Output As fn
-
For i = 0 To List3.ListCount - 1
-
Print #fn, List3.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack4.txt" For Output As fn
-
For i = 0 To List4.ListCount - 1
-
Print #fn, List4.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack5.txt" For Output As fn
-
For i = 0 To List5.ListCount - 1
-
Print #fn, List5.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack6.txt" For Output As fn
-
For i = 0 To List6.ListCount - 1
-
Print #fn, List6.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack7.txt" For Output As fn
-
For i = 0 To List7.ListCount - 1
-
Print #fn, List7.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack8.txt" For Output As fn
-
For i = 0 To List8.ListCount - 1
-
Print #fn, List8.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack9.txt" For Output As fn
-
For i = 0 To List9.ListCount - 1
-
Print #fn, List9.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack10.txt" For Output As fn
-
For i = 0 To List10.ListCount - 1
-
Print #fn, List10.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack11.txt" For Output As fn
-
For i = 0 To List11.ListCount - 1
-
Print #fn, List11.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack12.txt" For Output As fn
-
For i = 0 To List12.ListCount - 1
-
Print #fn, List12.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack13.txt" For Output As fn
-
For i = 0 To List13.ListCount - 1
-
Print #fn, List13.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack14.txt" For Output As fn
-
For i = 0 To List14.ListCount - 1
-
Print #fn, List14.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack15.txt" For Output As fn
-
For i = 0 To List15.ListCount - 1
-
Print #fn, List15.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack16.txt" For Output As fn
-
For i = 0 To List16.ListCount - 1
-
Print #fn, List16.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack17.txt" For Output As fn
-
For i = 0 To List17.ListCount - 1
-
Print #fn, List17.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack18.txt" For Output As fn
-
For i = 0 To List18.ListCount - 1
-
Print #fn, List18.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack19.txt" For Output As fn
-
For i = 0 To List19.ListCount - 1
-
Print #fn, List19.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack20.txt" For Output As fn
-
For i = 0 To List20.ListCount - 1
-
Print #fn, List20.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack21.txt" For Output As fn
-
For i = 0 To List21.ListCount - 1
-
Print #fn, List21.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack22.txt" For Output As fn
-
For i = 0 To List22.ListCount - 1
-
Print #fn, List22.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack23.txt" For Output As fn
-
For i = 0 To List23.ListCount - 1
-
Print #fn, List23.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack24.txt" For Output As fn
-
For i = 0 To List24.ListCount - 1
-
Print #fn, List24.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack25.txt" For Output As fn
-
For i = 0 To List25.ListCount - 1
-
Print #fn, List25.list(i)
-
Next
-
Close #fn
-
-
End Sub
-
-
Private Sub Command4_Click()
-
Me.Hide
-
End Sub
-
-
Private Sub Form_Load()
-
WinePage.Left = (Screen.Width / 2) - (InfoMain.Width / 2)
-
WinePage.Top = (Screen.Height / 2) - (InfoMain.Height / 2)
-
Combo1.AddItem "Rack 1"
-
Combo1.AddItem "Rack 2"
-
Combo1.AddItem "Rack 3"
-
Combo1.AddItem "Rack 4"
-
Combo1.AddItem "Rack 5"
-
Combo1.AddItem "Rack 6"
-
Combo1.AddItem "Rack 7"
-
Combo1.AddItem "Rack 8"
-
Combo1.AddItem "Rack 9"
-
Combo1.AddItem "Rack 10"
-
Combo1.AddItem "Rack 11"
-
Combo1.AddItem "Rack 12"
-
Combo1.AddItem "Rack 13"
-
Combo1.AddItem "Rack 14"
-
Combo1.AddItem "Rack 15"
-
Combo1.AddItem "Rack 16"
-
Combo1.AddItem "Rack 17"
-
Combo1.AddItem "Rack 18"
-
Combo1.AddItem "Rack 19"
-
Combo1.AddItem "Rack 20"
-
Combo1.AddItem "Rack 21"
-
Combo1.AddItem "Rack 22"
-
Combo1.AddItem "Rack 23"
-
Combo1.AddItem "Rack 24"
-
Combo1.AddItem "Rack 25"
-
Combo1.ListIndex = 0
-
-
Dim ff As Long
-
Dim line As String
-
ff = FreeFile
-
Open "\\Remote\WeatherArray\WineRacks\WineRack1.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List1.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack2.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List2.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack3.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List3.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack4.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List4.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack5.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List5.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack6.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List6.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack7.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List7.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack8.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List8.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack9.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List9.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack10.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List10.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack11.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List11.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack12.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List12.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack13.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List13.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack14.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List14.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack15.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List15.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack16.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List16.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack17.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List17.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack18.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List18.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack19.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List19.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack20.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List20.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack21.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List21.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack22.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List22.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack23.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List23.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack24.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List24.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack25.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List25.AddItem line
-
Loop
-
Close #ff
-
-
End Sub
-
-
-
Private Sub Timer1_Timer()
-
If Combo1.ListIndex = 0 Then
-
List1.Visible = True
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 1 Then
-
List1.Visible = False
-
List2.Visible = True
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 2 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = True
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 3 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = True
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 4 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = True
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 5 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = True
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 6 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = True
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 7 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = True
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 8 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = True
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 9 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = True
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 10 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = True
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 11 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = True
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 12 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = True
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 13 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = True
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 14 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = True
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 15 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = True
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 16 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = True
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 17 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = True
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 18 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = True
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 19 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = True
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 20 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = True
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 21 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = True
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 22 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = True
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 23 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = True
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 24 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = True
-
End If
-
-
End Sub
-
-
6 1724
Any help would be appreciated here. Not asking someone to do the work for me, I'm just looking to be pointed in the right direction.
Google isn't helpful and just gives me unrelated listbox links.
closest I could find was a youtube video titled "VB Listbox Example 4: Working with multiple lists - syncronising them" but it doesn't help me as it is for .net not VB6.
perhaps a control array? layer a bunch of listboxes on top of each other and use the combobox to change the index and which one is visible and being altered?
guess I'll trying tinkering with that idea since I can't get any help.
So far no luck. An array doesn't seem to work. Seems a listbox array shares data. Adding seems to add to the same listbox and removing doesn't seem to work. (Timer is on 10ms)
Also, Already tried using the Excel insert-able object on the form, however to be able to edit it required the xls document to be displayed on the form in an OLE window on the frame and if you wanted to edit it, it would open an instance of Excel instead of being able to edit it on the VB form so I scrapped that idea and tried the Array idea.
If anyone is interested, The array didn't work, but separate listboxes stacked on each other, changing the visibility with the combo index worked.
required a ton of If Then copy and paste. Code Follows
Update if anyone is interested. I added the ability to save the listboxs to text files and load them again when form loads.
Command 1 add contents of text box to current listbox
Command 2 Removes from listbox
Command 3 saves all listboxes to text files. -
Private Sub Command1_Click()
-
If List1.Visible = True Then
-
List1.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List2.Visible = True Then
-
List2.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List3.Visible = True Then
-
List3.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List4.Visible = True Then
-
List4.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List5.Visible = True Then
-
List5.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List6.Visible = True Then
-
List6.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List7.Visible = True Then
-
List7.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List8.Visible = True Then
-
List8.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List9.Visible = True Then
-
List9.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List10.Visible = True Then
-
List10.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List11.Visible = True Then
-
List11.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List12.Visible = True Then
-
List12.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List13.Visible = True Then
-
List13.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List14.Visible = True Then
-
List14.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List15.Visible = True Then
-
List15.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List16.Visible = True Then
-
List16.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List17.Visible = True Then
-
List17.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List18.Visible = True Then
-
List18.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List19.Visible = True Then
-
List19.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List20.Visible = True Then
-
List20.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List21.Visible = True Then
-
List21.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List22.Visible = True Then
-
List22.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List23.Visible = True Then
-
List23.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List24.Visible = True Then
-
List24.AddItem Text1.Text
-
Text1.Text = ""
-
ElseIf List25.Visible = True Then
-
List25.AddItem Text1.Text
-
Text1.Text = ""
-
End If
-
End Sub
-
-
Private Sub Command2_Click()
-
If List1.Visible And List1.ListIndex > -1 Then
-
List1.RemoveItem List1.ListIndex
-
ElseIf List2.Visible And List2.ListIndex > -1 Then
-
List2.RemoveItem List2.ListIndex
-
ElseIf List3.Visible And List3.ListIndex > -1 Then
-
List3.RemoveItem List3.ListIndex
-
ElseIf List4.Visible And List4.ListIndex > -1 Then
-
List4.RemoveItem List4.ListIndex
-
ElseIf List5.Visible And List5.ListIndex > -1 Then
-
List5.RemoveItem List5.ListIndex
-
ElseIf List6.Visible And List6.ListIndex > -1 Then
-
List6.RemoveItem List6.ListIndex
-
ElseIf List7.Visible And List7.ListIndex > -1 Then
-
List7.RemoveItem List7.ListIndex
-
ElseIf List8.Visible And List8.ListIndex > -1 Then
-
List8.RemoveItem List8.ListIndex
-
ElseIf List9.Visible And List9.ListIndex > -1 Then
-
List9.RemoveItem List9.ListIndex
-
ElseIf List10.Visible And List10.ListIndex > -1 Then
-
List10.RemoveItem List10.ListIndex
-
ElseIf List11.Visible And List11.ListIndex > -1 Then
-
List11.RemoveItem List11.ListIndex
-
ElseIf List12.Visible And List12.ListIndex > -1 Then
-
List12.RemoveItem List12.ListIndex
-
ElseIf List13.Visible And List13.ListIndex > -1 Then
-
List13.RemoveItem List13.ListIndex
-
ElseIf List14.Visible And List14.ListIndex > -1 Then
-
List14.RemoveItem List14.ListIndex
-
ElseIf List15.Visible And List15.ListIndex > -1 Then
-
List15.RemoveItem List15.ListIndex
-
ElseIf List16.Visible And List16.ListIndex > -1 Then
-
List16.RemoveItem List16.ListIndex
-
ElseIf List17.Visible And List17.ListIndex > -1 Then
-
List17.RemoveItem List17.ListIndex
-
ElseIf List18.Visible And List18.ListIndex > -1 Then
-
List18.RemoveItem List18.ListIndex
-
ElseIf List19.Visible And List19.ListIndex > -1 Then
-
List19.RemoveItem List19.ListIndex
-
ElseIf List20.Visible And List20.ListIndex > -1 Then
-
List20.RemoveItem List20.ListIndex
-
ElseIf List21.Visible And List21.ListIndex > -1 Then
-
List21.RemoveItem List21.ListIndex
-
ElseIf List22.Visible And List22.ListIndex > -1 Then
-
List22.RemoveItem List22.ListIndex
-
ElseIf List23.Visible And List23.ListIndex > -1 Then
-
List23.RemoveItem List23.ListIndex
-
ElseIf List24.Visible And List24.ListIndex > -1 Then
-
List24.RemoveItem List24.ListIndex
-
ElseIf List25.Visible And List25.ListIndex > -1 Then
-
List25.RemoveItem List25.ListIndex
-
End If
-
End Sub
-
-
Private Sub Command3_Click()
-
Dim fn As Long
-
Dim i As Integer
-
fn = FreeFile
-
Open "\\Remote\WeatherArray\WineRacks\WineRack1.txt" For Output As fn
-
For i = 0 To List1.ListCount - 1
-
Print #fn, List1.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack2.txt" For Output As fn
-
For i = 0 To List2.ListCount - 1
-
Print #fn, List2.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack3.txt" For Output As fn
-
For i = 0 To List3.ListCount - 1
-
Print #fn, List3.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack4.txt" For Output As fn
-
For i = 0 To List4.ListCount - 1
-
Print #fn, List4.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack5.txt" For Output As fn
-
For i = 0 To List5.ListCount - 1
-
Print #fn, List5.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack6.txt" For Output As fn
-
For i = 0 To List6.ListCount - 1
-
Print #fn, List6.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack7.txt" For Output As fn
-
For i = 0 To List7.ListCount - 1
-
Print #fn, List7.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack8.txt" For Output As fn
-
For i = 0 To List8.ListCount - 1
-
Print #fn, List8.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack9.txt" For Output As fn
-
For i = 0 To List9.ListCount - 1
-
Print #fn, List9.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack10.txt" For Output As fn
-
For i = 0 To List10.ListCount - 1
-
Print #fn, List10.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack11.txt" For Output As fn
-
For i = 0 To List11.ListCount - 1
-
Print #fn, List11.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack12.txt" For Output As fn
-
For i = 0 To List12.ListCount - 1
-
Print #fn, List12.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack13.txt" For Output As fn
-
For i = 0 To List13.ListCount - 1
-
Print #fn, List13.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack14.txt" For Output As fn
-
For i = 0 To List14.ListCount - 1
-
Print #fn, List14.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack15.txt" For Output As fn
-
For i = 0 To List15.ListCount - 1
-
Print #fn, List15.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack16.txt" For Output As fn
-
For i = 0 To List16.ListCount - 1
-
Print #fn, List16.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack17.txt" For Output As fn
-
For i = 0 To List17.ListCount - 1
-
Print #fn, List17.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack18.txt" For Output As fn
-
For i = 0 To List18.ListCount - 1
-
Print #fn, List18.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack19.txt" For Output As fn
-
For i = 0 To List19.ListCount - 1
-
Print #fn, List19.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack20.txt" For Output As fn
-
For i = 0 To List20.ListCount - 1
-
Print #fn, List20.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack21.txt" For Output As fn
-
For i = 0 To List21.ListCount - 1
-
Print #fn, List21.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack22.txt" For Output As fn
-
For i = 0 To List22.ListCount - 1
-
Print #fn, List22.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack23.txt" For Output As fn
-
For i = 0 To List23.ListCount - 1
-
Print #fn, List23.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack24.txt" For Output As fn
-
For i = 0 To List24.ListCount - 1
-
Print #fn, List24.list(i)
-
Next
-
Close #fn
-
Open "\\Remote\WeatherArray\WineRacks\WineRack25.txt" For Output As fn
-
For i = 0 To List25.ListCount - 1
-
Print #fn, List25.list(i)
-
Next
-
Close #fn
-
-
End Sub
-
-
Private Sub Command4_Click()
-
Me.Hide
-
End Sub
-
-
Private Sub Form_Load()
-
WinePage.Left = (Screen.Width / 2) - (InfoMain.Width / 2)
-
WinePage.Top = (Screen.Height / 2) - (InfoMain.Height / 2)
-
Combo1.AddItem "Rack 1"
-
Combo1.AddItem "Rack 2"
-
Combo1.AddItem "Rack 3"
-
Combo1.AddItem "Rack 4"
-
Combo1.AddItem "Rack 5"
-
Combo1.AddItem "Rack 6"
-
Combo1.AddItem "Rack 7"
-
Combo1.AddItem "Rack 8"
-
Combo1.AddItem "Rack 9"
-
Combo1.AddItem "Rack 10"
-
Combo1.AddItem "Rack 11"
-
Combo1.AddItem "Rack 12"
-
Combo1.AddItem "Rack 13"
-
Combo1.AddItem "Rack 14"
-
Combo1.AddItem "Rack 15"
-
Combo1.AddItem "Rack 16"
-
Combo1.AddItem "Rack 17"
-
Combo1.AddItem "Rack 18"
-
Combo1.AddItem "Rack 19"
-
Combo1.AddItem "Rack 20"
-
Combo1.AddItem "Rack 21"
-
Combo1.AddItem "Rack 22"
-
Combo1.AddItem "Rack 23"
-
Combo1.AddItem "Rack 24"
-
Combo1.AddItem "Rack 25"
-
Combo1.ListIndex = 0
-
-
Dim ff As Long
-
Dim line As String
-
ff = FreeFile
-
Open "\\Remote\WeatherArray\WineRacks\WineRack1.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List1.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack2.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List2.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack3.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List3.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack4.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List4.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack5.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List5.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack6.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List6.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack7.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List7.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack8.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List8.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack9.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List9.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack10.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List10.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack11.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List11.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack12.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List12.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack13.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List13.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack14.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List14.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack15.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List15.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack16.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List16.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack17.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List17.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack18.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List18.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack19.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List19.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack20.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List20.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack21.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List21.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack22.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List22.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack23.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List23.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack24.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List24.AddItem line
-
Loop
-
Close #ff
-
Open "\\Remote\WeatherArray\WineRacks\WineRack25.txt" For Input As #ff
-
Do While Not EOF(ff)
-
Line Input #ff, line
-
If Len(line) Then List25.AddItem line
-
Loop
-
Close #ff
-
-
End Sub
-
-
-
Private Sub Timer1_Timer()
-
If Combo1.ListIndex = 0 Then
-
List1.Visible = True
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 1 Then
-
List1.Visible = False
-
List2.Visible = True
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 2 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = True
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 3 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = True
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 4 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = True
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 5 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = True
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 6 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = True
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 7 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = True
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 8 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = True
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 9 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = True
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 10 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = True
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 11 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = True
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 12 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = True
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 13 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = True
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 14 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = True
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 15 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = True
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 16 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = True
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 17 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = True
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 18 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = True
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 19 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = True
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 20 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = True
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 21 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = True
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 22 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = True
-
List24.Visible = False
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 23 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = True
-
List25.Visible = False
-
ElseIf Combo1.ListIndex = 24 Then
-
List1.Visible = False
-
List2.Visible = False
-
List3.Visible = False
-
List4.Visible = False
-
List5.Visible = False
-
List6.Visible = False
-
List7.Visible = False
-
List8.Visible = False
-
List9.Visible = False
-
List10.Visible = False
-
List11.Visible = False
-
List12.Visible = False
-
List13.Visible = False
-
List14.Visible = False
-
List15.Visible = False
-
List16.Visible = False
-
List17.Visible = False
-
List18.Visible = False
-
List19.Visible = False
-
List20.Visible = False
-
List21.Visible = False
-
List22.Visible = False
-
List23.Visible = False
-
List24.Visible = False
-
List25.Visible = True
-
End If
-
-
End Sub
-
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Seth Delaney |
last post by:
I have a form with a combobox and a list box. The combobox will list
records (names of queries) that are entered in a table called
tblListName. I have the combobox set to get its values from this...
|
by: Deano |
last post by:
I needed to have a listbox populated by locations which are stored in
tblLocations.
However I wanted an "All locations" entry to be at the top of the listbox.
This is not in the tblLocations.
The...
|
by: hemashiki |
last post by:
hi
i want to select multiple choices in listbox using ctrl key
can any one suggest....plz
|
by: morfasie |
last post by:
Hi,
I ewas wondering, is it possible to add a combobox to the subitems of a listview or listbox?
like:
column1 | column 2| column 3 |
-----------------------------------------------...
|
by: rashmiraj |
last post by:
can anyone help me to write the code to get a field from database using combobox and that should display the corresponding record in datagrid using vb6.0
|
by: Renilkumar |
last post by:
Hi,
I am using .net 2.0. I have a .aspx page with vb.net as codebehind.
My form has one dropdown, 2 listboxes with add & remove button. During pageload I am loading all the values from the db to...
|
by: rajanji |
last post by:
Hi all ,
I am new to ASP.NET and need ur help for How to write the source code for downloading a file in ASP.NET 2005 using a combobox... i.e suppose i have five files in my website and i want to...
|
by: sreenu123 |
last post by:
Hi,
I want to read from values from database and add to listbox then transfering items from one listbox to another listbox using C#.NET. Can any one give source code.
Thanks in advance
sree
|
by: Mas Juliza Alias |
last post by:
Hi,
I am building a program on Information System for Reservoir Operation for my Masters research. Now I have a text file which is an output file from a processing software (Terramodel) that lists...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |