VBA code is crashing Excel on my PC only

excelliott

New Member
Joined
Sep 9, 2015
Messages
20
I've been working with this spreadsheet that opens .DAT files, copies a few thousand data points, and pastes them in the appropriate cells for a few months now. It worked perfectly fine for a month then it started to lag. It would freeze and display a message at the bottom saying, "contacting [path] for information. press ESC to cancel. I'd press excel and it would continue fine like nothing happened. a couple weeks later, I started getting a message from windows saying excel is not responding and it would close.

The point of failure is almost never in the same place. It happens at the start, the middle, after its done, and sometimes it will work fine. When I run this on other people's computers I don't see any issues. I've since made several other spreadsheets that do the same thing for other pieces of equipment. The only one that doesn't crash is the one that extracts from other excel files. I can't change the other equipment to export all there data as excel files. I've tried copying files to my computer then exporting them to the excel document and it works without issue, but that adds an extra step and doesn't solve the issue as to why it doesn't conventionally work on my computer.

My computer isn't bad specs wise: 8GB RAM and 3.3GHz processor should be sufficient. IT just tells me they don't know and maybe I should try making it copy smaller chunks. The issue with that is I have one spreadsheet that only copies 130 cells at a time and it still crashes more often than not. The one that copies thousands of data points would take forever to run if it copied less than 100 cells at a time.

So my overall question is:
What is causing this and is there a way to fix it?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
do you have a back up of an earlier file that isn't so slow, are the file sizes similar

have you optimized a original file, just wondering if you have many old connections / excess cache attached

what is your connection script
 
Upvote 0
I do have the old version. It crashes too. File size of the new one is smaller because i put a clear button in that removes all of the data so it went from 40MB to 20. This did make it faster but it still crashes just as much. the DAT. files are 340kB and haven't changed. As I said i made new spreadsheets that are less than 100kB that do this day one. I think there might be some cache on my computer that needs cleared but I'm not sure where.

I'm not sure what you mean by connection script.
 
Upvote 0
Sounds plausible. How do I find if that is the reason and what the cause is? Its a LAN connection so I'm not grabbing it from WiFi or another country.
 
Upvote 0
do you have listed connections in that location, they can build into thousands if not being cleaned out normally
 
Upvote 0

Forum statistics

Threads
1,214,572
Messages
6,120,306
Members
448,955
Latest member
Dreamz high

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top