For the life of me, I cannot get the syntax correct, it seems to me that it would be something with the Range portion of the TrnasferSpreadsheet action, but I just can't seem to get it right. If anybody knows, please let me know.
Here's what I've tried so far:
Am I missing something tiny, or am I going about it totally wrong?
I'm importing the worksheet into an existing table which was programatically made prior in the same procedure - that part worked perfectly.
I'll keep looking.
Oh, the error I'm getting is a variation of "Access cannot find the file, 'bla bla bla.'" Of course 'bla bla bla' will vary depending upon which method I attempt to use.
--
"If to err is human, then I must be some kind of human!" -Me
Here's what I've tried so far:
Code:
[GREEN]'This attempt was using the worksheet name as the range.[/GREEN]
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, ws.Name, strWbName, True, ws.Name
[GREEN]'This was trying to append the worksheet name to the end of the workbook address:[/GREEN]
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, ws.Name, strWbName & "#'" & ws.Name & "'", True
Am I missing something tiny, or am I going about it totally wrong?
I'm importing the worksheet into an existing table which was programatically made prior in the same procedure - that part worked perfectly.
I'll keep looking.
Oh, the error I'm getting is a variation of "Access cannot find the file, 'bla bla bla.'" Of course 'bla bla bla' will vary depending upon which method I attempt to use.
--
"If to err is human, then I must be some kind of human!" -Me