tranferspreadsheet filename question (multiple worksheets within the workbook for import)

StevieRayB

New Member
Joined
Mar 28, 2009
Messages
3
Hi all;
I have an Excel workbook that has 2 worksheets named "decision" and "quality". I need to load these 2 worksheets to Access into 2 seperate tables named (you guessed it) "decision" and "quality".

I have a form that builds the path and filename portion of the macro to execute the "transferspreadsheet" command.

I need to know exactly how the "filename" that includes the path is supposed to look to load the "decision" worksheet into the "decision" access table and the "quality" worksheet into the "quality" access table .

The path and filename is:
g:\excelfiles\accesstransfer\daily-transfer.xls

Thank you.
<!-- / message -->
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Welcome to the Board!

I find when importing multiple worksheets from the same Excel file into Access, it works best if you name the ranges you want to import on the Excel file (from Excel, highlight the range on the first sheet, Insert -> Name -> Define -> give it a name, then repeat for the other sheet).

On the TransferSpreadsheet action in Access, you can see the last argument is for the name of your range. Populate accordingly, and you should be good to go!
 
Upvote 0
No, you enter in the name of the range you created in Excel (go back and read my post again on how to name your range in Excel).

Also note that in Access, you can press F1 to get more detailed help on the arguments for the Macro actions.
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,128
Members
448,947
Latest member
test111

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top