Importing all tabs from a spreadsheet!

  • Thread starter Thread starter Fatz
  • Start date Start date
F

Fatz

I am trying to import a excel spreadsheet into Access through a button
with the following code:

strFilename = "\\boston07\shardata\settlement\wireroom\MTS-PL
Proof\ETExtract\eticket.xls"
DoCmd.RunSQL "INSERT INTO tbleticketing SELECT [eticket$].* FROM
[Excel 8.0;database=" & strFilename & "].[eticket$]"

The eticket fields above are the names of the tab on the spreadsheet I
want to import. The problem is the name always changes everytime you
save the file. How can I code this to grab all the tabs in the
spreadsheet and not just the eticket tab??

I appreciate any help you can give me!

Thanks,
Chris
 
Hi Chris

What I do is I just link the spreadsheet to my database, that way the data is
always available. You simply have to 'refresh' your other tables as required.

Maurice
 
Back
Top