This is only for copying the results, not for filling the CB's.
If you want that changed to VBA also, just ask.
Also change the range of dataset to "B12:K12"
Code:Private Sub cmdShowData_Click() Dim rngTarget As Range, i As Integer Application.ScreenUpdating = False Sheets("View").Range("dataSet").CurrentRegion.Offset(1).ClearContents With Worksheets("data") Set rngTarget = .Range("A1:J" & .Cells(Rows.Count, 1).End(xlUp).Row) With rngTarget For i = 1 To 3 .AutoFilter i + 2, Choose(i, cmbProducts.Text, cmbRegion.Text, cmbCustomerType.Text) Next .Offset(1).SpecialCells(xlCellTypeVisible).Copy Sheets("View").Range("B13") .AutoFilter End With End With Application.ScreenUpdating = True End Sub




Reply With Quote
Bookmarks