Hi,
In my example, there is a userform on which I have populated a listbox with unique values from column A of the source data worksheet. The user is able to copy the items they want to the other listbox by selecting them and using the add item button.
I then have a macro in module 2 which is called by the OK button on the userform. This macro extracts certain parts of data from the source workbook (SOURCEDATAEXAMPLE.xls) using autofilter and copies to the template worksheets in the target workbook (Sales Analysis Template1(WorkingVersion).xlsm) in which the userform exists.
This is an example section of the code...... (From Sub Update_Figures in Module 2 of Sales Analysis Template1(WorkingVersion).xlsm)
(sWs=Source Worksheet, tWs=Target Worksheet)
In the line I have highlighted in red, I want to autofilter this column based on the items that exist in listbox2 on the userform, rather than defining them spacifically in the code like is done here.
I would be grateful if someone can show me how to add to/modify my coding to achieve this.
Please see the attached examples.
Many thanks,
Bookmarks