Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Do you create an instance of Excel using Automation before running DoCmd.TransferSpreadsheet?

  3. #3
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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.


    [quote name='HansV' post='769383' date='06-Apr-2009 12:11']Do you create an instance of Excel using Automation before running DoCmd.TransferSpreadsheet?[/quote]

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    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.

  5. #5
    4 Star Lounger
    Join Date
    Jan 2003
    Location
    Central Florida, USA
    Posts
    505
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Thanks, Hans. I too found only references to automation, but thought I was doing something wrong. Thank you Microsoft.


    [quote name='HansV' post='769404' date='06-Apr-2009 14:48']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.[/quote]

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I don't have Windows Vista so I can't confirm or deny the behavior you describe.

  7. #7
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    [quote name='kwvh' post='769487' date='06-Apr-2009 19:35']Thanks, Hans. I too found only references to automation, but thought I was doing something wrong. Thank you Microsoft.[/quote]
    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....
    Wendell

  8. #8
    New Lounger
    Join Date
    Mar 2002
    Location
    Redmond, Washington, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •