D
davegb
Am trying to get a properly defined filter range to do an advanced
filter. When I execute "Selection.CurrentRegion.Select" from the
immediate window, it selects exactly what I want. But when I try to set
it as a variable to use for the filter, I get the object not defined
error.
Selection.CurrentRegion.Select
Set RecFltrRange = ActiveWindow.Selection
WkSht.Range(RecFltrRange).AdvancedFilter Action:= _
xlFilterCopy, CriteriaRange:=Sheets("Abuse in Care
Records").Range("aa1:aa2"), _
CopyToRange:=Range("A5"), Unique:=False
Anyone see what I am missing?
Thanks again.
filter. When I execute "Selection.CurrentRegion.Select" from the
immediate window, it selects exactly what I want. But when I try to set
it as a variable to use for the filter, I get the object not defined
error.
Selection.CurrentRegion.Select
Set RecFltrRange = ActiveWindow.Selection
WkSht.Range(RecFltrRange).AdvancedFilter Action:= _
xlFilterCopy, CriteriaRange:=Sheets("Abuse in Care
Records").Range("aa1:aa2"), _
CopyToRange:=Range("A5"), Unique:=False
Anyone see what I am missing?
Thanks again.