I am new to Excel vba and am trying to filter records based on certain column selection. 1st I would like to filter out all #Div/0 errors and 2nd I would like to filter for only records ">=" a user input box. I'm using the following code:
Dim StartDate As Long
Dim temp As String
temp = Application.InputBox("Enter Last Rate Increase Run Date in the Format ""MM/DD/YYYY""")
StartDate = CLng(DateValue(temp))
Application.ScreenUpdating = False
ActiveSheet.AutoFilterMode = False
Dim LastRow As Long, FilterRange As Range
ActiveSheet.Range("$AC3:$AH").AutoFilter Field:=1, Criteria1:="<>#DIV/0!", Operator:=xlAnd, Field:=6, Criteria2:=">" & StartDate
I am getting a Runtime Error 1004: "application defined or object defined error" on the last line. What do I have incorrect?
Thank you to all the wonderful help on this site that helped me get this far.
Dim StartDate As Long
Dim temp As String
temp = Application.InputBox("Enter Last Rate Increase Run Date in the Format ""MM/DD/YYYY""")
StartDate = CLng(DateValue(temp))
Application.ScreenUpdating = False
ActiveSheet.AutoFilterMode = False
Dim LastRow As Long, FilterRange As Range
ActiveSheet.Range("$AC3:$AH").AutoFilter Field:=1, Criteria1:="<>#DIV/0!", Operator:=xlAnd, Field:=6, Criteria2:=">" & StartDate
I am getting a Runtime Error 1004: "application defined or object defined error" on the last line. What do I have incorrect?
Thank you to all the wonderful help on this site that helped me get this far.