Sorting ListBox Source

G

Guest

Hello,

I'm not the greatest at VBA so hopefully this makes sense. I have a user
form where the user selects a from combo box 6 different text example "
Selection of Items" then in ListBox 61 comes specifiic data in pulled from a
defined area in the work book. Im trying to figure out how to do 2 things.

1. create a command button ( I tried to create one using the code below)
that will move a selected item in ListBox61 up or down.
2. Create a command button that will move the selected item to the top of
the list.

I'm having trouble doing this because everything I try then prevents the
information to be put into Listbox 61 depending on what the user selects in
combo box 6.

Any help would be appreciated.

Thank you.

Private Sub CommandButton7_Click()

If ComboBox6.Text = "Selection of Items" Then
ListBox61.RowSource = "BCK!Selection_of_Items"
List61.ListIndex = List61.ListIndex - 1
End If
End Sub
 
G

Guest

since your using rowsource to fill your listbox, you will have to move the
data on the worksheet.
 
G

Guest

can I move the data in the worksheet while still giving the user the ease of
use of the userform? or can you point me in an easier direction?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top