Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd.TransferSpreadsheet

Status
Not open for further replies.

Beginner613

Technical User
Dec 7, 2006
8
US
Hi All!
I want to use
"DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "ImportSpecification", "FileName", True"

and it does work. But what should I add in the code in order to specify TAB in my excel spreadsheet. This excel spreadsheet has 10 different tubs. I want specific one...


Thank you in advance,
B
 
Add the named range as 6th parameter.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, strTable, FileName.Path, True, [b]"SheetName!"[/b]
where SheetName is the name of your sheet (tab)

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top