Method 'Range" of object'_Global' failed
Range("A" & x & ":A" & y).Select
--
Regards,
Tom Ogilvy
"Tim" wrote in message
...
I get this error when i try to run, how could i place variables in the
selection.
Sheets("Eclipse").Select
Range("A1").Select
Cells.Find(What:="wopr", After:=ActiveCell, LookIn:=xlFormulas, LookAt
_
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False).Activate
Cells.Find(What:="7p2", After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False) _
.Activate
x = Cells.Find(What:="7p2", After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False) _
.Activate
y = Selection.End(xlDown).Select
Range("A$x:A$y").Select
<-----------------------------------------------------------------Problem
line
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
Range("D2").Select
ActiveSheet.Paste
End Sub
|