View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Selecting a Range Of Cells.

Try

Selection.Resize(1,8).Select

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Neil" wrote in message
...
Can I select a range of cells programatically without knowing exactly

which
ones they are?

I have a sheet that has a variable number of rows and columns, my code
searches all cells for a certain condition, and when the condition is met,

it
needs to select that cell, and the next 8 cells in the same row in order

to
copy and paste them somewhere else.

I've tried to use the line: (and various derivatives)

Selection.Offset(0, 8).Select

But this doesn't work.

Can anyone tell me what I'm doing wrong?

Thanks

Neil