Set previously selected item as selected in ListBox

whitehawk81

Board Regular
Joined
Sep 4, 2016
Messages
66
Hi, I haven't posted here for while. But unfortunately I'm facing an issue with a userform listbox selection change, that exceeds my knowledge.
The goal, I would like to achieve is following:
There is a multicolumn single select listbox, where the selection populates some textboxes based on the selected data.
You can select any row and the fields get updated accordingly, but changing a value in a textbox gets detected and if you click to another list item, you will be prompted if you would like to keep the changes or abandon them.
In case you select to keep the changes, the listbox should be reset to the previously selected item.
No matter, which method I try, the selected item in the listbox will not reset to the previous selection, it remains the currently selected.
 
Well, click event needs a click :) and iirc the listbox doesn't actually change when you select another row. I remember facing something similar, and will have to look for it. Anyway, good to know it got sorted.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top