Hi everybody. I need a help. I have a listbox with two items. There is an option to remove one item, or the other, and then the list is empty and you can re-add it again if you want. I need whenever items are back on the list, to be clickable. The problem is that each item has to open separate form. Item 1 has to open form 1, item 2 - open form 2. Any ideas? I am over my head.
ListBox1.Clear
ListBox1.AddItem Sheets("Data").Range("A1")
ListBox1.AddItem Sheets("Data").Range("A2")
For x = ListBox1.ListCount - 1 To 0 Step -1
If Trim(ListBox1.List(x)) = "" Then
ListBox1.RemoveItem x
End If
Next x
the code above, removes an item from the listbox when one of the cells is empty. as my items are populeted from cells.
ListBox1.Clear
ListBox1.AddItem Sheets("Data").Range("A1")
ListBox1.AddItem Sheets("Data").Range("A2")
For x = ListBox1.ListCount - 1 To 0 Step -1
If Trim(ListBox1.List(x)) = "" Then
ListBox1.RemoveItem x
End If
Next x
the code above, removes an item from the listbox when one of the cells is empty. as my items are populeted from cells.