DoCmd.TransferSpreadsheet

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill Agee

    DoCmd.TransferSpreadsheet

    How do you specify a specific worksheet? I know this works if the worksheet
    in question is the 1st, but suppose
    I am interested in importing several worksheets from the same workbook.
    There does appear to be a way to
    specify the worksheet by name.


  • Mr. Bungle

    #2
    Re: DoCmd.TransferS preadsheet

    Simple, type the spreadsheet name follow by a bang (!)in the range
    parameter of the transfer spreadsheet command...Use the following
    syntax as an example to refer to a seperate sheet(this is for an
    import):

    DoCmd.TransferS preadsheet , acSpreadsheetTy peExcel9, "YourTableName" ,
    [FileName], True, "YourExcelSprea dsheetName!A43: L60"

    Jeremy

    Comment

    Working...