Old macro breaks!
Thanks, Tom, that helped me track down the problem.
Tom Ogilvy wrote:
rFltrRng isn't a variable. It is a string constant. Used in the context
you present, it represents the name of a range in Insert=Name=Define.
You need to go to Insert=Name=Define and see what the current refers to
Range definition is. If it isn't what you expect, then you need to figure
out how it is getting changed.
--
Regards,
Tom Ogilvy
"davegb" wrote in message
oups.com...
I've been running a series of macros without problems for months. When
I made some major modifications to another macro in the same project,
all these macros stopped working, even though the macro I was modifying
and these macros don't call or relate to each other. The only
connection is that they use the same range and varable name for that
range.
Sub Top10()
ActiveSheet.Range("rFltrRng").AdvancedFilter
Action:=xlFilterInPlace, CriteriaRange:= _
Range("Z1:Z2"), Unique:=False
Range("a1").Select
End Sub
I've tried using a different name for "rFltrRng" to separate it from
the other variable in the other macro.
Any ideas?
Thanks
|