Thread: Copy Row
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Copy Row

try this
range(selection,selection.end(xltoright)).select

or without selecting
range(selection,selection.end(xltoright)).copy

--


Gary


"Johno" wrote in message
...
Hello all,
Firstly, this is a great forum for picking up great tips. I am new to
VBA programming and am having (to me) a small problem with my
spreadsheet.

I have my data set out in the format of Col A across to Col Y.
(database)? I am using a macro written by Ron De Bruin to select an ID
number that is always in Col A.

What I need to be able to do is after selecting the required ID
number, select the entire data for the selected row so it can be
copied to another location. I have tried the Selection.End(xltoright)
but all this does is select the very end data.

Would this forum be able to show me the command I need? or maybe a
combined macro that will find the ID number, select the complete data
and copy to another location?

Many thanks.

Les