![]() |
Compile Error - Help
I'm new to Macros and programming. Why am I getting a compile error?
Sheets("Data").Select Range("L3:U100").Select Selection.ClearContents Range("A18:J50000").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= Range ("A2:J4"), CopyToRange:=Range("L3:U100"), Unique:=False Sheets("Search").Select End Sub Any help is greatly appreciated!! |
Compile Error - Help
don't get a compile error, but i don't know if it works, either
Sheets("Data").Select Range("L3:U100").Select Selection.ClearContents Range("A18:J50000").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= _ Range("A2:J4"), CopyToRange:=Range("L3:U100"), Unique:=False Sheets("Search").Select End Sub -- Gary "Beginner" wrote in message ... I'm new to Macros and programming. Why am I getting a compile error? Sheets("Data").Select Range("L3:U100").Select Selection.ClearContents Range("A18:J50000").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= Range ("A2:J4"), CopyToRange:=Range("L3:U100"), Unique:=False Sheets("Search").Select End Sub Any help is greatly appreciated!! |
Compile Error - Help
You also need to add a new line at the top...
Sub SomeName -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Beginner" wrote in message I'm new to Macros and programming. Why am I getting a compile error? Sheets("Data").Select Range("L3:U100").Select Selection.ClearContents Range("A18:J50000").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= Range ("A2:J4"), CopyToRange:=Range("L3:U100"), Unique:=False Sheets("Search").Select End Sub Any help is greatly appreciated!! |
Compile Error - Help
Is that End Sub line within your shell? Such that you have two End Sub lines
for your macro? If so, just remove the first one. VBA won't like two End Subs in a row. If that's not it, can you reply giving the exact error message you're getting. Hope this helps. Keith "Beginner" wrote: I'm new to Macros and programming. Why am I getting a compile error? Sheets("Data").Select Range("L3:U100").Select Selection.ClearContents Range("A18:J50000").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:= Range ("A2:J4"), CopyToRange:=Range("L3:U100"), Unique:=False Sheets("Search").Select End Sub Any help is greatly appreciated!! |
All times are GMT +1. The time now is 04:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com