Range selection not working
Hi Kanan,
You are not mapping the source onto the same size target. The problem is in
the Rows("2:2")
So instead of
Rows("2:2").Select
you could use
Range("A2").Select
which will copy into A2 across
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"kanan" wrote in message
...
hi,
Iam using officeXP and the following VBA code is not working in EXCEL. I
would greatly appreciate if somebody
can tell me the correct way to do this code. I get 'select method of range
class failed" error message.
' here is the code
dim cvalue as integer
cvalue=4
Worksheets("sheet2").Select
Range(Cells(cvalue, 1), Cells(cvalue, 54)).Select
Selection.Copy
Sheets("Sheet3").Select
Rows("2:2").Select
ActiveSheet.Paste
' end of code
thanks
Kanan
Any ideas?
|