Editing items in a ListBox

E

Ed Sowell

I have a worksheet with data that I want to allow the user to edit but only
through User form. To this end, I load the worksheet into a ListBox on a
Userform that also has a Combo box ro Text box for each of the columns in
the ListBox. the idea is to allow the user to select a row in the ListBox,
move the data into the various combo or text boxes, allow editing of one or
more such boxes, then write back into the selected row in the List box.
After doing this on one or more rows, an OK button will write back into the
worksheet.

What's hanging me up right now is it won't let me write back into the
ListBox. Is this a fundamental problem, or is there a Property of the
ListBox that would allow it?

If I can't do it, what is the work-around? I suppose I could just save the
changed rows in a separate table for later writing into the Worksheet, but
that would eliminate the visual feedback of seeing the data change in the
table.

Any ideas?

TIA

Ed
 
E

Ed Sowell

I figured it out. I load the data from the worksheet into a 2-d table of
strings, then simply assign it to the ListBox.List.
After editing the data in the ListBox (programmatically), I write the
ListBox back into the worksheet cell-by-cell.

Works great

Ed
 

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