Hi. My listbox contains 3 columns. I know that it is possible to delete a row from the listbox (link), but this time I need to correct data (not to delete). Can it be done entirely from the userform?![]()
Hi. My listbox contains 3 columns. I know that it is possible to delete a row from the listbox (link), but this time I need to correct data (not to delete). Can it be done entirely from the userform?![]()
Please * if you like the answer
Sure - you cannot edit the values directly on the listbox, but you can add, say, three textboxes for value entry, one for each column:
![]()
Please Login or Register to view this content.
Bernie Deitrick
Excel MVP 2000-2010
Thanks Bernie. Here is my code, where to put your code? I've added the textboxes and a button (#2) but the values in the range do not change.
![]()
Please Login or Register to view this content.
Last edited by GIS2013; 06-23-2014 at 11:10 AM.
Isn't that code for adding data to the worksheet from the listbox?
If posting code please use code tags, see here.
@Norie,
Yes, the process goes like that:
1. Adding data to the worksheet from Combobox and Textbox.
2. Displaying this data in listbox1 (at least part of it, if it's too long)
1+2 are done with my original code.
3. Picking a row from listbox1 (by the mouse) and then changing data in the worksheet.
Why I need 3? because sometime the values which were filled in were incorrect..
Thanks
The code Bernie posted would go in a separate sub, eg EditMeal, and could be run via the click event of a command button.
I added 2 new textboxes (2&3) and a new button. It doesn't work, but without any error. Maybe it has to do with the?Did I need to change any property that related to listbox1?.RowSource
How are you populating your listbox?
Can you upload an example workbook?
Click on GO ADVANCED and use the paperclip icon to open the upload window.
Please see attached file. I've added one row. Now suppose I need to correct this line. Below
you can see textbox 2&3 and correct is the new button.
Have a look at the attached file.
Wow amazingmany thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks