sflowers
11-14-2011, 04:34 PM
I am having the most ridiculous problem, but I cannot get a VBA autofilter call to work to save my life! I can manually execute the filter in question, but when I run the following
Sub LocationFilter()
MsgBox (ActiveSheet.Name)
ActiveSheet.Range("A:M").AutoFilter Field:=2, Criteria1:="802"
End Sub
absolutely nothing happens. Sheet is unprotected, data format is general......Any suggestions?
So for an overview, I just recorded the following with the auto record feature
Sub Macro2()
' Macro2 Macro
ActiveSheet.Range("$A$1:$O$136267").AutoFilter Field:=4, Criteria1:="7"
End Sub
I then cleared the filter on the sheet and re-executed the macro, nothing happened. WTF?
Sub LocationFilter()
MsgBox (ActiveSheet.Name)
ActiveSheet.Range("A:M").AutoFilter Field:=2, Criteria1:="802"
End Sub
absolutely nothing happens. Sheet is unprotected, data format is general......Any suggestions?
So for an overview, I just recorded the following with the auto record feature
Sub Macro2()
' Macro2 Macro
ActiveSheet.Range("$A$1:$O$136267").AutoFilter Field:=4, Criteria1:="7"
End Sub
I then cleared the filter on the sheet and re-executed the macro, nothing happened. WTF?