Thread: copy row
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default copy row

Hi Nowfal,

Try:

Dim num1 As Variant, num2 As Long

num1 = InputBox("Enter the row number to copy")
num2 = 20

If IsNumeric(num1) Then
Worksheets("Sheet1").Rows(num1).Copy _
Destination:=Worksheets("Sheet2").Rows(num2)
End If

---
Regards,
Norman



"nowfal" wrote in
message ...

Hi,
I didn't get a hand from the experts, still waiting. I just repeat
the request:
the user wanted to copy one row from sheet 1 to a fixed row to the
second sheet.
Mr. Tom was given me the earlier code which is working well. i wanted
to remove the second input box and made it to a fixed say A20 of the
second sheet.
Please look into this matter.
thanks and regards
nowfal

Beow is Toms code:
Dim num1 as Variant, num2 as Variant
num1 = InputBox("Enter the row number to copy")
num2 = InputBox("Enter the destination row")
if isnumeric(num1) and isnumeric(num2) then
Worksheets("Sheet1").Rows(num1).copy _
Destination:=Worksheets("Sheet2").rows(num2)
end if


--
nowfal
------------------------------------------------------------------------
nowfal's Profile:
http://www.excelforum.com/member.php...o&userid=10003
View this thread: http://www.excelforum.com/showthread...hreadid=386219