+ Reply to Thread
Results 1 to 5 of 5

EXCEL.exe running in background after routine has completed....

  1. #1
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    EXCEL.exe running in background after routine has completed....

    Hi Guys,

    I have a massive chain of macros spread over 5 modules and

    Module 1 = Opens up a userform, then calls module 2s chain of macros, then calls module 3's chain of macros and then finally module 4's chain.
    Module 2 = Opens 10 documents, Imports the data, Closes the documents, manipulates the data inside the original sheet.
    Module 3 = Uses the imported data and manipulates it more, opens up a database file, imports more data, closes the document, uses a bunch of formulas, maniplates more, opens up a new document pulls in more data and maniplates more.
    Module 4 = Uses the userform from the start and saves the file into several parts, opens up a sheet throws the data into that sheet and then saves that sheet several times..
    Module 5 = Contains some simple functions that are called by module 2, 3 and 4

    The computer is using Office 2010 and I can't post the document in question because it contains too much confidential data/code :/

    I can't figure out why there are a bunch of stuck/frozen/hung excel.exe processes.

    I thought as soon as a sub ends it forgets all of the values that were in the memory / locals?, the only global variables I have are a bunch of true/false variables...

    Any idea how I can solve this without having to put

    Please Login or Register  to view this content.
    Any help would be appreciated.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: EXCEL.exe running in background after routine has completed....

    At any point do you create a new instance of Excel in this lengthy process?

    Also, at any point could it be possible that a document that's been opened isn't being closed once its been dealt with?

    Finally, are you using a fair bit of On Error.. in the code?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: EXCEL.exe running in background after routine has completed....

    I'm using the following at one bit:

    I have 10 of the following:
    Please Login or Register  to view this content.

    I have 1 of the following, next two code examples use this same file so it only closes later on
    Please Login or Register  to view this content.
    I have 6 of the following
    Please Login or Register  to view this content.
    I have 1 of the following (it closes the file from above that stays open through 5 macros)
    Please Login or Register  to view this content.
    I have 1 of the following:
    Please Login or Register  to view this content.

    I have loads of the following:
    Please Login or Register  to view this content.
    Do I need to set all of them to nothing???

    At the very end of my code I use:
    Please Login or Register  to view this content.
    Is this where the problem is? If I use the close function it leaves excel up with no documents opened.
    Last edited by Hyflex; 08-14-2014 at 05:42 PM.

  4. #4
    Forum Contributor
    Join Date
    09-07-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    358

    Re: EXCEL.exe running in background after routine has completed....

    Bump, Could still really do some help with this.

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: EXCEL.exe running in background after routine has completed....

    hi Hyflex, it looks it has nothing to do with VBA, this is an opposite question but I think it should help you to restore expected behaviour beyond coding: http://answers.microsoft.com/en-us/o...9-c23a0e3a314b

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel running in the background caused windows 7 to not log off/shut down
    By GavArm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 06:50 AM
  2. Excel sometimes crashes when running a sub routine
    By Brunstgnegg in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 08-20-2010, 06:55 AM
  3. Running MS Excel in background OR minimized.
    By Shane O in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-20-2010, 11:20 AM
  4. Excel running in background after exiting from mail merge
    By Dynamo Nath in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-20-2009, 11:07 AM
  5. Replies: 0
    Last Post: 05-23-2007, 08:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1