Urgent: ListBox Population Problem and then Advanced Autofilter

fiqulupo

New Member
Joined
Mar 5, 2012
Messages
5
All,

I am having two problems with a UserForm

1.) First, this code is not populating the listbox with the relevant data. Sheet3 is getting the filtered data, but then I want the "Business_Unit_Test" ListBox to be populated with the filtered data. What am I doing wrong?:

Code:
With Sheet1 'Source data sheet with unfiltered data

.Range("D2", .Range("D65536").End(xlUp)).AdvancedFilter _
Action:=xlFilterCopy, CriteriaRange:="", CopyToRange:=Sheet3.Range("D2"), Unique:=True
Sheet3.Range("D2", Selection.End(xlDown)).CurrentRegion.Name = "Business_Unit"
Business_Unit_Test.RowSource = "Business_Unit"

2.) Then I want the data in the original source to be filtered by all the selections that the user makes (multi-select ListBoxes) to the original source sheet, and copied to Sheet5. So, I have a range of the filter selections in Sheet3 to populate the listboxes. I have a range of all items in Sheet1. And I want the Autofilter to apply the selected parameters from the listboxes to the data in sheet1 and copy to sheet5. How can I do this?

Thank you so much in advance.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,203,115
Messages
6,053,593
Members
444,674
Latest member
DWriter9

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