View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tim tim is offline
external usenet poster
 
Posts: 105
Default Method 'Range" of object'_Global' failed


I get this error when i try to run, how could i place variables in the selection


Sheets("Eclipse").Selec
Range("A1").Selec
Cells.Find(What:="wopr", After:=ActiveCell, LookIn:=xlFormulas, LookAt
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=
False).Activat
Cells.Find(What:="7p2", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
.Activat
x = Cells.Find(What:="7p2", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
.Activat
y = Selection.End(xlDown).Selec
Range("A$x:A$y").Select <-----------------------------------------------------------------Problem lin
Application.CutCopyMode = Fals
Selection.Cop
Sheets("Sheet1").Selec
Range("D2").Selec
ActiveSheet.Past

End Sub