I have this sub in Excel 2010 that's supposed to copy in a table from Access 2010. When I try to run the code, it gives me a 'Could not find installable ISAM'. When I debug, it highlights objDB.Execute.
Private Sub btnGetData_Click()
Unload ParameterMenu
formWait.Show
'Save workbook
ActiveWorkbook.Save
Dim strExcelFile As String
Dim strWorksheet As String
Dim strDB As String
Dim strTable As String
Dim objDB As Database
strExcelFile = "X:\Form.xlsm"
strWorksheet = "RawDates"
strDB = "X:\Tables.accdb"
strTable = "Dates"
Set objDB = OpenDatabase(strDB)
objDB.Execute _ 'Error occurs here.
"SELECT * INTO [Excel 14.0;DATABASE=" & strExcelFile & _
"].[" & strWorksheet & "] FROM " & "[" & strTable & "]"
objDB.Close
Set objDB = Nothing
Unload formWait
FinishDialog.Show
End Sub
I'm not overly experienced with VBA, so any assistance would be greatly appreciated.