Hi...
I'm trying to set the criteria field as not equal to my variable. I need the variable because this file will eventually be saved repeatedly as a new version with a different account number. I do not want to have to update code in each one. The code that I have works correctly to identify the criteria as = to the variable, but does not work as <> to the variable. I receive various error messages including "Expected:Named Parameter" and "Syntax Error." I've reviewed many posts and I don't see where I am going wrong.
I'd appreciate any assistance!
ActiveSheet.Range("A" & FirstRow & ":R" & LastRow).AutoFilter Field:=1, Criteria1:=CUSTODY
ActiveSheet.Range("A" & FirstRow & ":R" & LastRow).AutoFilter Field:=1, Criteria1:"<>CUSTODY"
Thank you!
I'm trying to set the criteria field as not equal to my variable. I need the variable because this file will eventually be saved repeatedly as a new version with a different account number. I do not want to have to update code in each one. The code that I have works correctly to identify the criteria as = to the variable, but does not work as <> to the variable. I receive various error messages including "Expected:Named Parameter" and "Syntax Error." I've reviewed many posts and I don't see where I am going wrong.
I'd appreciate any assistance!
ActiveSheet.Range("A" & FirstRow & ":R" & LastRow).AutoFilter Field:=1, Criteria1:=CUSTODY
ActiveSheet.Range("A" & FirstRow & ":R" & LastRow).AutoFilter Field:=1, Criteria1:"<>CUSTODY"
Thank you!