+ Reply to Thread
Results 1 to 3 of 3

How come my macro keeps crashing

  1. #1
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    How come my macro keeps crashing

    I got the following error when I ran my 700 lines of codes.

    Run-time error '-2147417848(80010108)':
    Automation error
    The Object invoked has disconnected from its clients.

    When I clicked debug, it pointed me to this code:

    Please Login or Register  to view this content.
    Basically, I copied some data from another sheet and create another sheet and paste the data to the new sheet using the above codes. It's weird how it returns an error sometimes. I have a big macros that is like 700 lines of code, and if I run it the first time, everything works perfectly, but when I run it again, I would get the above error. Is it because I didn't clear the memory and my system is out of memory?

    Also, since the macro is so long, it would run for 10 seconds and then excel just closes. The weird thing is it works sometimes and sometimes it returns an error.


    I declared the following variables

    Please Login or Register  to view this content.
    How do I clear the memory for these variables after I am done with the macro?
    Last edited by alexduy; 01-29-2021 at 01:56 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How come my macro keeps crashing

    I have experienced that sort of issue recently. Maybe its a new feature of 365.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Re: How come my macro keeps crashing

    I'm on my work computer. We use Excel 2016.

+ 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. [SOLVED] Sort Operation Works when Macros are called manually, but not when VBA calls the Macros
    By lovecolorado in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-18-2019, 02:13 PM
  2. Multiple macros for several files that change weekly - where to store macros
    By janljan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-21-2018, 10:54 PM
  3. Replies: 2
    Last Post: 04-13-2017, 02:57 AM
  4. Replies: 0
    Last Post: 06-09-2015, 09:30 PM
  5. Replies: 1
    Last Post: 10-02-2013, 09:05 PM
  6. Macros: Data cleaning macros not producing expected outputes.
    By bertlogdi1 in forum Excel Programming / VBA / Macros
    Replies: 31
    Last Post: 06-17-2011, 06:52 AM
  7. [SOLVED] choose default macros Not Enabled / Macros Enable Setting
    By BEEJAY in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2006, 08:10 AM

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