Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help needed with code
Hi,
I have this sample code but everytime i try to run it this line is highlighted and nothing happens: Set rng = .Range(Cells(1, 17), Cells(LastRow, LastColumn)) The rest of the code: LastColumn = .Cells(1, Columns.Count).End(xlToLeft).Column LastRow = .Cells(Rows.Count, 1).End(xlUp).Row Set rng = .Range(Cells(1, 17), Cells(LastRow, LastColumn)) rng.Copy Destination:=NewbkS1.Range("E1") oldbk.Activate .Columns("H:H").AutoFilter Field:=1, Criteria1:="X" .Columns("C:F").Copy Destination:= _ NewbkS1.Range("A1") .Columns("K:Q").Copy Destination:= _ NewbkS1.Range("E1") Whats going wrong? please help, thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with code needed | Excel Programming | |||
VBA code help needed | Excel Discussion (Misc queries) | |||
Code Needed | Excel Programming | |||
VBA code Help needed | Excel Programming | |||
code needed | Excel Programming |