View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mervyn Thomas[_3_] Mervyn Thomas[_3_] is offline
external usenet poster
 
Posts: 7
Default Passing a variable to a range statement

Please could you tell me the correct syntax to use in this bit of code where
I am trying to define a named range "Jobs" which is A1 to row number
NoOfRows. A macro recorded this bit of code below and I am trying to
replace the "R360" with something like RNoOf Rows. R&NoOfRows does not
work.

ActiveWorkbook.Names.Add Name:="Jobs", RefersToR1C1:="=sheet1!R1C1:R360C1"