Importing Excel data into Access
- From: George <George@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 20 Jun 2005 14:22:04 -0700
I'm using this logic to import Excel data into Access.
Public Sub ImportProtected(strFile As String, strPassword As String)
Dim oExcel As Object, oWb As Object
Set oExcel = CreateObject("Excel.Application")
Set oWb = oExcel.Workbooks.Open(FileName:=strFile, _
Password:=strPassword)
DoCmd.TransferSpread*** acImport, _
acSpreadsheetTypeExcel9, "Import", strFile, -1
oWb.Close
oExcel.Quit
Set oExcel = Nothing
End Sub
It works great but it leaves an instance open of Excel in my task list.
Can someone tell me what is wong with this logic and why it is not actually
exiting Excel?
.
- Follow-Ups:
- Re: Importing Excel data into Access
- From: Allan Murphy
- Re: Importing Excel data into Access
- Prev by Date: Re: Make Code to Set Default On Open
- Next by Date: RE: Verifying data before entry
- Previous by thread: Verifying data before entry
- Next by thread: Re: Importing Excel data into Access
- Index(es):