Friday, April 20, 2012

Limit to number of "named ranges" in Range method

I am using the following code:



Dim rng As Range

Set rng = Workbooks("import sheet.xls").Sheets("import").Range("project_name,project_author,project_code,project_breaker,default_fault_ac_mcb,default_fault_ac_mccb,default_fault_dc,default_fault_acb,default_rvdrop,default_svdrop,default_eff,default_pfactor,default_ratio,default_freq,default_sfactor_ac,default_spfactor")

For Each cell In rng.Cells
MsgBox cell
Next cell


Now project_name,project_author are different named ranges in the sheet,the problem is when i add another named range to the above list (already defined) i get a runtime error 1004 (select method of range class failed)



Is there a limit to the number of named ranges u can add to range object ?





No comments:

Post a Comment