vba - Pass all the Range Names in an Excel Workbook to an Array -
i pass existing names in workbook array , redim array ubound limit, cannot first base of returning names.
i preparing basic monte carlo simulation , want use array inputs , outputs we'll basis create histogtram , cumualtive charts.
sub rangecheck_() dim n name each n in activesheet.names msgbox n next n end sub even basic routine not work on sheet 40 names defined. appreciate save list of names simple range("x").listnames , feed array clumsy , hoping can suggest better solution. doing in excel 2011 in case makes difference.
thanks
peter
consider:
sub qwerty() dim n name each n in activeworkbook.names msgbox n.name next n ncount = activeworkbook.names.count dim ary redim ary(1 ncount) string = 1 ncount ary(i) = activeworkbook.names(i) next end sub
Comments
Post a Comment