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

TransferSpreadsheet...but I want Worksheet two! 1

Status
Not open for further replies.

TudorSmith

Programmer
Jan 14, 2002
245
GB
Help!

I have the following code:

Code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblPGMImport", strImportPath, , "A16:V100"

This is successfully importing my spreadsheet...but now I want to run the code again, and import the data on worksheet 2 of the spreadsheet into a different table!

Any clues?

Thanks

birklea
birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!
 
Put the sheet name in the range ie. &quot;Sheet1!A1:A5&quot;
 
Excellent...so let me get this straight...sheet two in my spreadsheet is called &quot;PGRD&quot;, so my import spec should read:

Code:
&quot;PGRD!A1:V100&quot;

birklea birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!
 
It worked a treat...thanks...have a star! :) birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top