Thread
:
difficult question
View Single Post
#
3
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
difficult question
try this from anywhere in the workbook
Sub copyslectedrows()
R = InputBox("pls input the first row number")
R1 = InputBox("pls input the last row number")
With Sheets("sheet2")
lr = .Cells(Rows.Count, "a").End(xlUp).Row+1
sheets("source").Rows(R & ":" & R1).Copy .Rows(lr)
End With
End Sub
--
Don Guillett
SalesAid Software
"Wu" wrote in message
...
I want to write a marco that to copy few specified rows from sheet 1 to
sheet
2:
.................................................. .................................................. ...
R=Inputbox("pls input the first row number")
R1=inputbox("pls input the last row number")
Rows(R:R1).Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
.................................................. .................................................. .....
But, the above macro is not work at "Rows(R:R1).Select", I would like to
use
inputbox to enter specified number of row to copy from sheet1 to sheet2.
How
to do that???
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett