title: Trying to Get Information from an XLSX Spreadsheet in an XLA File
body: <p>I have an XLA file with 9 Modules, each containing a macro, with data in sheets in the XLA file.  I've used this successfully for 18 years, but have run out of room in the XLA file to store more data.  I've tried moving the data into an XLSX file and linking to it from the XLA file, but I keep getting "Type Mismatch" errors which I think are coming from my Workbooks.Open statement.  I don't see why; it seems right from every other example I've seen.  I need to keep the XLA file since there are tens of thousands of other Excel files that link to it.  Any thoughts on how to fix this would be appreciated.</p>
  
  <pre><code>Function Mortality(TableNum As Integer, Optional SetChange As Integer, _
   Optional TableLoad As Double, Optional ScaleNum As Integer, _
   Optional ScaleSetChange As Integer, Optional ScaleLoad As Double, _
   Optional StartYear As Integer, Optional EndYear As Integer, _
   Optional YOB As Integer, Optional CurrentYear As Integer) As Variant
  '
  ' Dimension Variables
  '
  Dim NumberofTables As Integer, I As Integer, NumberofScales As Integer, ProjMax As Integer
  Dim ProjStart As Integer
  Dim StartPoint As Range, StartScalePoint As Range
  Dim MortTable As Variant, ScaleTable As Variant
  Dim ScaleTable2D As Variant
  Dim Start2D As Integer, End2D As Integer, J As Integer
  Dim ScaleBook As String, ScaleColumns As Integer, Scale1stCol As Integer
  Dim StartLoop As Integer, EndLoop As Integer
  Dim ActuarialDataFile As Workbook
  Set ActuarialDataFile = Workbooks.Open(Filename:="Z:\Computer Related\Installation Files\Annuity Factor Program\Annuity.xlsx", ReadOnly:=True)
  '
  ' Set Basic Mortality Table before revision
  '
  Set StartPoint = ActuarialDataFile.Worksheets("Mortality Tables").Range("A1")
  </code></pre>