Insert listbox into macro

didj

Board Regular
Joined
Feb 7, 2008
Messages
50
Hi this one is a bit beyond my present VBA skills.

My data arrays are access queries which contain multiple names (ie: person names) and each name has multiple dates associated with it. Most of the time, I want to pull out all data in the row which corresponds to the most recent date for all individuals (which is easy enough to achieve without a listbox) however, ideally I want a more powerful solution that would allow me to chose any date and/or multiple dates.

Can I insert a listbox that opens automatically whilst the macro is in run mode (perhaps contains a question such as, "what dates do you wish to view results for?"), then allows me to choose one or multiple dates (which are all located in column B for example), then copies the all data in the rows which correspond to those dates?

Is this the best method or should I be thinking about something completely different?

Thanks
Didj
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,213,534
Messages
6,114,185
Members
448,554
Latest member
Gleisner2

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