Results 1 to 2 of 2
  1. #1
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    67

    Additional worksheet being added


    I am exporting back to back
    DoCmd.TransferSpreadsheet statement for 2
    queries to the same excel file; each with a specific name at the end of the statement. When excel opens, I can see both of the names of the worksheets exported. I immediately start to add 3 more worksheets. After executing my 1st .sheets.add.name = "xxx" there is a 2nd worksheet added as well entitled SHEET2. If I only export a single query, it doesn't add SHEET2. How do I prevent SHEET2 from automatically being added when exporting/ adding worksheet when exporting to more than 1 query?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Post your procedure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 06-15-2016, 05:19 AM
  2. Replies: 2
    Last Post: 05-25-2016, 06:46 AM
  3. Worksheet within Excel Workbook
    By rpkfish in forum Macros
    Replies: 4
    Last Post: 05-06-2016, 03:02 PM
  4. Replies: 9
    Last Post: 07-27-2015, 01:19 PM
  5. Importing the second excel worksheet
    By geoffwbailey in forum Programming
    Replies: 1
    Last Post: 06-25-2010, 12:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums