+ Reply to Thread
Results 1 to 2 of 2

Unexpected crash after macro execution

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Romania
    MS-Off Ver
    Excel 2010
    Posts
    1

    Unexpected crash after macro execution

    Hi,
    I have a macro which i need to run 10 times for different paths. The macros are the same excepting the "path_usr" and "file_usr". The macros needs to open another excel document, and replace the PROJECTS sheet from that document with the same named sheet form the first document. I do it in this way:

    Please Login or Register  to view this content.
    This macro works without problems one time, but when i try to run it for the second user, it gives me the "Microsoft Excel has encoutered a problem and needs to close" error on the "Set w = Workbooks.Open(path)" step. Also if i simply close Microsoft Excel after the first macro execution i get the same error.
    I can succesfully run each macro individually, but i need to restart Excel after every macro.
    I have Microsoft Excel 2010 installed, on my Windows XP SP3, with no active add-ins in Excel.
    It is very strange that sometimes i can run 2 or 3 macros before the crash, and if all the files are on the local computer, not on the network, it is no error at all.
    If anyone can help me thanks in advance.
    Last edited by arlu1201; 09-05-2012 at 06:04 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Unexpected crash after macro execution

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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