How to import data from Excel that has password protected shee?

  • Thread starter Thread starter Boon
  • Start date Start date
this did not work...

I have a vba code that will import the data from the excel file. I open the
excel file,import it and close it. But I think I have the problem with
closing it.The VBA works fine, but when I reopen the excel file from the
file inself, it says something about the Read Only, Notify......

Here is my code

Function ImportBidData(FileName As String)
Set excel = CreateObject("excel.Application")

excel.workbooks.Open (FileName)

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12,
"tbl_Temp_Quote1", FileName, False, "Quote1Direct"

excel.workbooks.Close

excel.Quit

Set excel = Nothing
 
Back
Top