• Docmd.Transfer Spreadsheet leaves Excel open

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Docmd.Transfer Spreadsheet leaves Excel open

    • This topic has 7 replies, 4 voices, and was last updated 16 years ago.
    Author
    Topic
    #458871

    Is there any reason why the following would open an instance of Excel?
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, stDocName, strFileNameLS

    Not only does it open an instance of Excel, but it also leaves it open. I have used the above code for over 4 years, and am only now running up against this. In the past it has always been in a WindowsXP or WindowsXP Pro environment running Access 2003.

    Now running Windows Vista Ultimate with Access 2003. No other code changes.

    Any ideas are greatly appreciated.

    Ken

    Viewing 0 reply threads
    Author
    Replies
    • #1155339

      Do you create an instance of Excel using Automation before running DoCmd.TransferSpreadsheet?

      • #1155340

        No. And because I actually run the same line of code three times in order to put three sheets in the file, I get three instances.

        I stepped through the code to see when the instances are opening and each time it is when it executes the transferspreadsheet line.

        Do you create an instance of Excel using Automation before running DoCmd.TransferSpreadsheet?

        • #1155355

          I’m sorry, I can’t explain this. DoCmd.TransferSpreadsheet doesn’t need an instance of Excel to run, and the only mentions I’ve been able to find in google and the newsgroups of Excel remaining in memory after DoCmd.TransferSpreadsheet involved automating Excel.

          • #1155411

            Thanks, Hans. I too found only references to automation, but thought I was doing something wrong. Thank you Microsoft.

            I’m sorry, I can’t explain this. DoCmd.TransferSpreadsheet doesn’t need an instance of Excel to run, and the only mentions I’ve been able to find in google and the newsgroups of Excel remaining in memory after DoCmd.TransferSpreadsheet involved automating Excel.

            • #1155421

              I don’t have Windows Vista so I can’t confirm or deny the behavior you describe.

            • #1155452

              Thanks, Hans. I too found only references to automation, but thought I was doing something wrong. Thank you Microsoft.

              I don’t have the same combination you do – but running Vista business and Access 2007, it doesn’t appear to open an instance of Excel at all. Which is of course no help to you….

            • #1155504

              Hi Ken,

              I tried your problem with a one line Docmd.TransferSpreadsheet on a machine with Vista SP1 and Office 2003 SP2 and could not reproduce it.

              Which service packs of Vista and Office 2003 are you running?

              Docmd.TransferSpreadsheet does not require Excel to be installed on the machine so this behavior is very odd. Have you seen it with other database on the same machine?

              Kevin

    Viewing 0 reply threads
    Reply To: Docmd.Transfer Spreadsheet leaves Excel open

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

    Your information: