View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harlan Grove[_5_] Harlan Grove[_5_] is offline
external usenet poster
 
Posts: 97
Default Array and Named Ranges

" wrote...
...
The code fails on the last line. I am unable to transfer the array
into VBA.


Private Sub GetPricingFiles()

...
PriceArray = Workbooks(strbookname).Range(PricingFileNamedRange )

End Sub


Even if second.xls is a single sheet, Excel 2.1 format .XLS file, and despite
the fact that you could create external reference links to cells in it using
just =second.xls!X99, that doesn't change the fact that the Workbook class
doesn't have Range properties. Try

PriceArray = Workbooks(strbookname).Worksheets(1).Range(Pricing FileNamedRange)

--
To top-post is human, to bottom-post and snip is sublime.