View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default finding the row value of a defined name

Dim r1 as long
dim c1 as long
dim r2 as long
dim c2 as long
dim myRng as range

with worksheets("sheet1")
set myrng = .range(.cells(r1,c1),.cells(r2,c2))
end with

(I'd use Long instead of integer.)


gvm wrote:

Thanks Rowan, it works of course.

One final question (for this project anyway), I am using a range term, eg
Range("H14:N18"), where all four row and column references are variables, eg
row1, col1, row2, col2. How do I write these variables into the argument of
Range() please?


--

Dave Peterson