On Oct 2, 9:40*pm, Dave Peterson <peter...@XSPAMverizon.net> wrote:
> There are some Range objects that need a leading dot:
>
> with Sheets("Raw data")
> * * .Range("a2", .Range("a2").End(xlDown)).copy
> * * * * Sheets("Sheet1").Range("A6")
>
> * * .Range("c2", .Range("a2").End(xlDown).End(xlToRight)).copy
> * * * * Sheets("Sheet1").Range("C6")
>
> * * .Range("a6", _
> * * * *.Range("a6").End(xlDown).End(xlToRight)).borders.linestyle=xlContinuous
>
> * * .Range("A5:N1799").Sort Key1:=.Range("B5"), Order1:=xlAscending, _
> * * * *Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _
> * * * *Orientation:=xlTopToBottom, _
>
> * * *'This is working on the selection -- which may not be what you
> * * *'want!
> * * *Selection.AutoFilter Field:=3, Criteria1:=">4-Aug-2010",
>
> end with
> End Sub
>
> On 10/02/2010 17:10, Roger Dodger wrote:
>
>
>
>
>
> >> with Sheets("Raw data")
> >> .Range("a2", Range("a2").End(xlDown)).copy
> >> Sheets("Sheet1").Range("A6")
> >> .Range("c2", Range("a2").End(xlDown).End(xlToRight)).copy
> >> Sheets("Sheet1").Range("C6")
> >> .Range("a6",
>
> > I get a compile error Here
>
> >> Range("a6").End(xlDown).End(xlToRight)).borders.linestyle=xlContinuous
> >> .Range("A5:N1799").Sort Key1:=Range("B5"), Order1:=xlAscending,
> >> Header:= _
> >> xlGuess, OrderCustom:=1, MatchCase:=False,
> >> Orientation:=xlTopToBottom, _
> >> Selection.AutoFilter Field:=3, Criteria1:=">4-Aug-2010",
> >> Operator:=xlAnd
> >> end with
> >> End Sub- Hide quoted text -
>
> >> - Show quoted text -
>
> --
> Dave Peterson- Hide quoted text -
>
> - Show quoted text -
Also missing line continuation. Surely your vba editor is showing in
red...
If you still have problems send me your file to
(E-Mail Removed)
and this msg.