Hi All,
I have a problem I am working on a huge macro and had to split some of it into separate macros due to the "Too large" error. The following is working when it's a part of the main code. But when I include it as a separate macro it crashes on the line where it refers to another sheet. Any ideas how to solve this?
I have a problem I am working on a huge macro and had to split some of it into separate macros due to the "Too large" error. The following is working when it's a part of the main code. But when I include it as a separate macro it crashes on the line where it refers to another sheet. Any ideas how to solve this?
Code:
Sheets("ABCDE").Activate
Rows("5:5").Select
Selection.AutoFilter
ActiveSheet.Range("$A$5:$M5").AutoFilter Field:=12, Criteria1:="<>"
ActiveSheet.Range("$A$5:$M5").AutoFilter Field:=10, Criteria1:=Worksheets("johnny").Cells(i, 10).Value
ActiveSheet.Range("$A$5:$M$792").AutoFilter Field:=6, Criteria1:=">0", _
Operator:=xlAnd