From: Boon on
I used the Spreadsheettransfer but it did not work.

thanks!


From: golfinray on
What did not work about it?
--
Milton Purdy
ACCESS
State of Arkansas


"Boon" wrote:

> I used the Spreadsheettransfer but it did not work.
>
> thanks!
>
>
> .
>
From: Boon on
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


"golfinray" <golfinray(a)discussions.microsoft.com> wrote in message
news:80C2B55A-4476-4426-9359-8796CB4A9730(a)microsoft.com...
> What did not work about it?
> --
> Milton Purdy
> ACCESS
> State of Arkansas
>
>
> "Boon" wrote:
>
>> I used the Spreadsheettransfer but it did not work.
>>
>> thanks!
>>
>>
>> .
>>


From: J_Goddard via AccessMonster.com on
Hi -

Using TransferSpreadsheet means you don't need the to explicitly open & close
the Excel file. Try removing the references to it - you are not using those
references in the TransferSpreadsheet command anyway.

John


Boon wrote:
>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
>
>> What did not work about it?
>>
>[quoted text clipped - 3 lines]
>>>
>>> .

--
John Goddard
Ottawa, ON Canada
jrgoddard at cyberus dot ca

Message posted via http://www.accessmonster.com