Is there really a space in ".Impor t"
As far as I can tell, "Application" is referring to Access. That is why I suggested creating an Excel object (in Access VBA code). Something like this.. I cut this example code From Ken Snell's site:
Code:
Dim blnHasFieldNames As Boolean, blnEXCEL As Boolean, blnReadOnly As Boolean
Dim lngCount As Long
Dim objExcel As Object, objWorkbook As Object
Dim colWorksheets As Collection
Dim strPathFile as String, strTable as String
Dim strPassword As String
' Establish an EXCEL application object
On Error Resume Next
Set objExcel = GetObject(, "Excel.Application")
If Err.Number <> 0 Then
Set objExcel = CreateObject("Excel.Application")
blnEXCEL = True
Err.Clear
On Error GoTo
End If
.
.
.
objExcel.VBE.ActiveVBProject.VBComponents.Import (FileDirectory)
To control Excel through automation, you have to reference Excel.
I know this won't work, but you see where I am headed???