Excel file is locked after Import

X

x-rays

Hi all,

After importing an excel file, using the following code:

DoCmd.TransferSpreadsheet transfertype:=acImport, _
tablename:=tablename, _
filename:=filename,
Hasfieldnames:=True, _
Range:=SheetName & "$",
SpreadsheetType:=5

The excel file is locked and can open it Read Only.

Do you have any ideas why is this happened?
Do I miss something in my Code?

Thanks in advance,

Kind Regards,

Kostas
 
X

x-rays

Thanks for your response, the knowledge base article you suggested
doesn't help me at all.

Any other ideas?


Ï/Ç rico Ýãñáøå:
 
X

x-rays

It has to do with the Excel.exe, although I do use xlWorkbook.Close
and xlApp.Quit, the Excel.exe instances/processes are not destroyed.

Ο/Η x-rays έγÏαψε:
 
D

Douglas J. Steele

All you showed was using DoCmd.TransferSpreadsheet. How are you
instantiating xlWorkbook and xlApp? There should be no need have objects
like that simply to use TransferSpreadsheet.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


It has to do with the Excel.exe, although I do use xlWorkbook.Close
and xlApp.Quit, the Excel.exe instances/processes are not destroyed.

?/? x-rays ??????:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top