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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

transfespreadsheet question

Status
Not open for further replies.

cmz21

Programmer
May 5, 2005
110
US
Hello,
I am using transferspreadsheet to load an access table from an excel spreadsheet. It is working fine except for one thing. I want to load a second table from another worksheet within the workbook I am in. Is this possible? I switch worksheets before I use transferspreadsheet, but it seems to keep using the first sheet in the workbook.

Can I do what I want to do or am I going to have to keep reordering the worksheets?

Thanks
 
Found the Answer.
Here is the line of code I used -


DoCmd.TransferSpreadsheet transfertype:=acImport, TableName:="tblYour_Table_Name", FileName:="C:/Path/plus/filename.xls", Hasfieldnames:=True, Range:="Retiree Dental!", SpreadsheetType:=5


Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top