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:
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?Please Login or Register to view this content.
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
How do I clear the memory for these variables after I am done with the macro?Please Login or Register to view this content.
Bookmarks