Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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!! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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!! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) | |||
VBAProject name compile error, not defined at compile time | Excel Programming | |||
error message: compile error, argument not optional | Excel Programming | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) |