Update worksheet cell value and Listbox rowsource with double click in another Listbox

johnnytominaga

New Member
Joined
Apr 27, 2018
Messages
19
Hey guys!


I'm working on a project that includes an User Form that should incorporate the following functionalities:


a) User searches a database by typing a value in a textbox
b) Once clicking "Search", the results are display in a Listbox
c) If an item in the Listbox is double clicked, the UserForm will fill out the rest of the form, which includes all data related to that item in the database
d) It will also fill out a second listbox with all other items in the database that have the same value in a specific column (for example, "City")


I've managed to make items 'a', 'b' and 'c' work, but I'm stuck on 'd'. I'm sending the value to be advanced filtered from the first listbox to the worksheet, but it only loads when I close the User Form.


How can I get it to update the cell value in the worksheet once the user double clicks the item in the first Listbox? Also, how can I make sure the second Listbox's rowsource is also updated with that same interaction?

Hope it didn't get too confusing.
I'll be glad to clear it up if needed.


Thanks a lot.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,215,465
Messages
6,124,975
Members
449,200
Latest member
Jamil ahmed

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