Private Sub btnImportBase_Click()
Dim oXLApp As Excel.Application
Dim oXLBookTemp As Excel.Workbook
Dim oXLBookCurrent As Excel.Workbook
Dim oXLSheetControl As Excel.Worksheet
Dim oXLSheetBase As Excel.Worksheet
Dim oXLSheetTemp As Excel.Worksheet
Dim iBase As Integer
Dim sBase As String
Dim aBase(5) As String
Dim iLastRow As Integer
Dim iLastCol As Integer
Dim iCol As Integer
Dim iRow As Integer
aBase(1) = "Base1"
aBase(2) = "Base2"
aBase(3) = "Base3"
aBase(4) = "Base4"
aBase(5) = "Base5"
Set oXLBookCurrent = ThisWorkbook
Set oXLSheetControl = oXLBookCurrent.Worksheets("Control")
Set oXLApp = New Excel.Application
oXLApp.Visible = True 'Visible for debug only
For iBase = 1 To 5
sBase = oXLSheetControl.Cells(8 + iBase, 2).Value 'Contains path of file to open
If Not sBase = "" Then 'If path exists
Set oXLBookTemp = oXLApp.Workbooks.Open(sBase) 'Open CSV file
Set oXLSheetTemp = oXLBookTemp.Worksheets(1) 'Define worksheet
'define worksheet in current book based on index iBase
Set oXLSheetBase = oXLBookCurrent.Worksheets(aBase(iBase))
' find last used row and column
iLastRow = oXLSheetTemp.Cells(Application.Rows.Count, 1).End(xlUp).Row
iLastCol = oXLSheetTemp.Cells(1, Application.Columns.Count).End(xlToLeft).Column
'This works but is VERY slow
For iRow = 1 To iLastRow
For iCol = 1 To iLastCol
oXLSheetBase.Cells(iRow, iCol) = oXLSheetTemp.Cells(iRow, iCol)
Next iCol
Next iRow
'This also works but I have to hard code the range
oXLSheetTemp.Range("A:AA").Copy
oXLSheetBase.Range("A1").PasteSpecial Paste:=xlPasteValues
End If
Next iBase
oXLApp.Quit
Set oXLSheetTemp = Nothing
Set oXLSheetBase = Nothing
Set oXLBookCurrent = Nothing
Set oXLBookTemp = Nothing
Set oXLApp = Nothing
End Sub