Thread: Data moving 2
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
climate climate is offline
external usenet poster
 
Posts: 91
Default Data moving 2

I have following code:
Sub climate()
Dim x As Long, y As Long
x = Range("X" & Rows.Count).End(xlUp).Row
y = InputBox("enter the row number to paste")
Range("A2:BK2" & x).Copy
Range("A" & y).PasteSpecial
MsgBox "Updated"
End Sub

I want to cut data of range(A2:BK2 to end row related) and then paste to row
number which determine in Box. when i run above code on some of sheets, error
message appear(Run Time error 1004). please note that, this code with cut
command not run, only with copy command.

any help will be greatly appreciated.
climate