sferguson524
Pattern Altitude
For our excel gurus here... I have a userform with a combo box that filters the data on one sheet and moves it to another. All WAS working well and nothing changed in my code, now it's throwing an error 1004 autofilter method of range class failed when I select things in the combo box. See code below. Any help is appreciated!
Private Sub ComboBox3_Change()
Sheets("Filtered").UsedRange.ClearContents
Selection.AutoFilter
' turn off any autofilters that are already set
Sheets("Source").AutoFilterMode = False
' filter column C based on combo box selection
Selection.AutoFilter Field:=3, Criteria1:=ComboBox3.Value
' copy the visible cells to cell A1
Sheets("Source").UsedRange.SpecialCells(xlCellTypeVisible).Copy Range("Filtered!A1")
' Turn off any autofilters that are already set
Sheets("Source").AutoFilterMode = False
End Sub
Private Sub ComboBox3_Change()
Sheets("Filtered").UsedRange.ClearContents
Selection.AutoFilter
' turn off any autofilters that are already set
Sheets("Source").AutoFilterMode = False
' filter column C based on combo box selection
Selection.AutoFilter Field:=3, Criteria1:=ComboBox3.Value
' copy the visible cells to cell A1
Sheets("Source").UsedRange.SpecialCells(xlCellTypeVisible).Copy Range("Filtered!A1")
' Turn off any autofilters that are already set
Sheets("Source").AutoFilterMode = False
End Sub