Thread
:
Help needed with code
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Help needed with code
No with/end with or missing dots within with/end with
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Gemz" wrote in message
...
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!
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett