QUOTE(Plenoptic @ Jul 15 2006, 04:03 AM)

Ok so I have a list and I am trying to make a click event that transfers the value of that item on the list to a text box to edit it. The only problem is I have a label for each item as Item 1: Item 2: etc; (not item exactly). So what I want to do is before the transfer is made have it select the "Item #" part and delete it so it is just the item name itself. It is sort of confusing but I was pretty sure it could be done. Any help would be appreciated.
I think I understand you. This is what I would do:
QUOTE
Private Sub Form_Load()
'additems to list1
With List1
.AddItem "abc", 0
.AddItem "def", 1
.AddItem "ghi", 2
.AddItem "jkl", 3
End With
'Name the Label1's
For x = 0 To 3 Step 1
Label1(x) = "Item #" & x + 1
Next x
End Sub
Private Sub List1_Click()
'restore the Label1 names
For x = 0 To 3 Step 1
Label1(x) = "Item #" & x + 1
Next x
'Set Label1's caption to the list1 selection
Label1(List1.ListIndex).Caption = List1.Text
'Text1's text is the selected item's name
Text1.Text = List1.Text
End Sub
Just create an array of labels named Label1(four of them), a listbox named List1, and a textbox named Text1. I think it is pretty straight-forward.
Reply