View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
roblo[_6_] roblo[_6_] is offline
external usenet poster
 
Posts: 1
Default Help in using an Offset in a .Range().Select


I am trying to Select a Range of cells where the last cell is calcualted
and will be plugged in at run time.

worksheets.Range("A1:C1").Select ' This works of course, selecting A1
to C1 but I wanted the ending cell to be calculated.

worksheets.Range("A1", Range("A1").Offset(colTOright)).Select

Where colTOright will be calculated earlier. I tried just plugging in
a number for colTOright but get an VBScript runtime error, Type
mismatch: 'Range'

Is there another way?

Thanks
Robert


--
roblo
------------------------------------------------------------------------
roblo's Profile: http://www.excelforum.com/member.php...o&userid=22469
View this thread: http://www.excelforum.com/showthread...hreadid=399231