• Export to Excel with Multiple Tabs (2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Export to Excel with Multiple Tabs (2003)

    Author
    Topic
    #454299

    I have code that will export a table or query to Excel and can split it into multiple FILES based on a field in the data.

    What I need to do now is export to Excel and split into multiple TABS based on a field.

    Pointers?

    Viewing 0 reply threads
    Author
    Replies
    • #1127366

      When you export to an existing workbook, Access will export to a sheet with the same name as the table or query being exported. If this sheet doesn’t exist, it will be created, and if it already exists, it will be overwritten.
      So one option is change the name of the table/query each time, so that the data will be written to different sheets.

      Another option is not to export from Access, but to import into Excel, using the CopyFromRecordset method – look it up in the Excel VBA help, there’s a complete example.

    Viewing 0 reply threads
    Reply To: Export to Excel with Multiple Tabs (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: