Compile Error - Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!!
 
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
 
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!!
 
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
 
Back
Top