title: 'Range' is an interface type and cannot be used as an expression
body: <p>I have been trying everything and I have absolutely no idea why this is not working. I have looked at countless previous questions and answers and nothing works. I have a dialog where the user selects a number of files that can then be imported into Excel. The problem arises when setting the import range.</p>
  
  <pre><code>Dim files As New OpenFileDialog
  files.Multiselect = True
  files.InitialDirectory = My.Settings.path
  
  If (files.ShowDialog() = DialogResult.OK) Then
      My.Settings.files = files.InitialDirectory
      My.Settings.Save()
      MsgBox("Files to be imported: " &amp; files.Multiselect, MessageBoxIcon.Information)
      If String.IsNullOrEmpty(My.Settings.path) Then
          MsgBox("Warning! No files were imported!", MessageBoxIcon.Exclamation)
      End If
  End If  
  
  Dim openExcel As New Microsoft.Office.Interop.Excel.Application
  Dim openWorkbook As New Microsoft.Office.Interop.Excel.Workbook
  Dim openWorksheet As New Microsoft.Office.Interop.Excel.Worksheet
  
  openExcel = CreateObject("Excel.Application")
  openExcel.Visible = True
  openExcel.UserControl = True
  openWorkbook = openExcel.Workbooks.Add
  openWorksheet = openWorkbook.ActiveSheet
  
  With openWorksheet.QueryTables.Add(Connection:=My.Settings.files, Destination:=Range("$A$1"))
  
  End With
  </code></pre>
  
  <p>It keeps giving me the error: "BC30111 'Range' is an interface type and cannot be used as an expression"</p>