View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Abdul Abdul is offline
external usenet poster
 
Posts: 35
Default Subscript out of range

thanks for the reply, however your suggestion didn't solve the problem. and
currently I edited few more of the lines and removed some unnecessary ones,
but I'm still unable to paste the copied data, the code now looks like the
following:

Range("B1:B20").Select
Selection.Copy
Workbooks.Open Filename:= _
"C:\Documents and Settings\User\Desktop\Book1.xls"
ActiveWorkbook.Windows("Book1.xls").Activate
ActiveWorkbook.Sheets("Sheet1").Activate
Application.Goto Reference:="R1C256"
Selection.End(xlToLeft).Select
ActiveCell.Offset(0, 1).Select
Selection.Paste
End sub

the debugger shows there is an error on the line before the
last,[selection.paste] do you have any suggestions?