PDA

View Full Version : Solved: Refilling row with data from selected item in listbox



Charlize
08-02-2006, 06:22 AM
I am able to do a search with autofilter by using a form. It shows the rows that contains the values that are submitted (a maximum of 7). I can populate a listbox with only the visible items in a listbox (i would also like to have the columnnames ???).

But when I click or double click the row in the listbox I need to change one value (column 7 - location of a book). This changed value (or the whole row) has to be rewritten to the row that contained the previous value.

Any idea's ... Listindex ? Rowno ?

ps.: The rows in the listbox are not added via rowsource.

Charlize
08-03-2006, 01:14 AM
I am able to do a search with autofilter by using a form. It shows the rows that contains the values that are submitted (a maximum of 7). I can populate a listbox with only the visible items in a listbox (i would also like to have the columnnames ???).

But when I click or double click the row in the listbox I need to change one value (column 7 - location of a book). This changed value (or the whole row) has to be rewritten to the row that contained the previous value.

Any idea's ... Listindex ? Rowno ?

ps.: The rows in the listbox are not added via rowsource.

I've solved it by creating a column with a unique number (ie rownumber). On double click in the list I select the entirerow with help from the unique number and a findroutine.

Afterwards I populate a userform with a combobox to select the desired change and use ActiveCell.EntireRow.Cells(1, 8).Value = Me.Combo_Locatie.Value. So column H gets a new value.

If you leave the combobox empty, there is a warning. You have to select something or close the form.