title: creating multiple datatables in for each loop
body: <p>I have the following sub. I have an string array with e.g. 3 strings (a,b,c). I wanna fill datatables with data from excelsheets and name the tables a,b,c.</p>
  
  <pre><code>Sub create_Dataset(ByVal ParamArray DataTableNames() As String)
  For Each FileElement In DataTableNames
  ...
  MyConnection.Open()
  da.Fill(DS, FileElement)
  MyConnection.Close()
  Dim dt As DataTable = DS.Tables(FileElement)
  Form1.DataGridView1.DataSource = DS.Tables(0)
  Form1.DataGridView2.DataSource = DS.Tables(1)
  </code></pre>
  
  <p>Running this code give me an error "ds.Tables(1) doesnt exist. According to my understanding this is because i create only one table (Dim dt As DataTable = DS.Tables(FileElement))and put the data into this table over and over again. But how can i create a table for each array element?</p>