[newbie alert] help on add item to list box

mike-wigan

Newcomer
Joined
Oct 6, 2005
Messages
16
Location
Wigan UK
i know if i do this
Code:
Private Sub FilesList_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles FilesList.DoubleClick
        Dim Singer() As String
        'InputBox("Singer?" = Singer(0) + 1)
        LstKaraokeQue.Items.Add("name")

it will add the word name to the list box LstKaraokeQue.
i dont want it to do that i want it to add the filename i have clicked on and add it to the list

the bit what is commented out i want it to ask me for a name first and add it to the front of the file name in LstKaraokeQue

can someone help ??
 
It is a little confusing to determine what you are having a problem with. What is InputBox and what is name supposed to be? Are you getting a null reference error here? There isn't anything in the Singer array when you try and access it. Are you having trouble filling that array? Is it possible to give a little more information?

What is FilesList, a listbox? This might be what you are looking for -- get the index of the item selected by seeing what item is selected in FileList and add the text for that item to the LstKaraokeQue. Check out the SelectedItem property for the ListBox Class.
 
Back
Top