Excel VBA crashes on 1 pc, works on other

storm8

Active Member
Joined
Apr 7, 2010
Messages
327
Hi,

I have a VBA code that creashes my excel every time I run it. the funny thing is that it works on 2 different PC well.

It involves copying information from an array placed in a class, run some data verification on it and save it in different class.
As hard as try I cannot find any code error (the code is rather long and complex) - but as I said it works well on other computers, so there probably is no major issue.

I am also not able to find the exact spot where it crashes. if I step trough the code it works, but once I run it crashes excel.

The original problem was with Excel 2010 x64 win 7, I have also tested it with excel 2013 x64 and on both excels under virtual Win 8.
No matter the configuration the excel would crash on 1 machine and work on others.

I have also tested exporting all modules and importing them to new workbook. running the code would freeze excel again :/

My CPU is Intel C2D P8700

any suggestions on how to fix this or where to look for more help?

thanks
 
The RAM might be faulty. That's all I can think of. Maybe check how each machine handlers virtual memory and page-file etc.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
thanks andrew at least for the 32 bit solution.

nuked: Im not sure how to do that
 
Last edited:
Upvote 0
Checked the RAM and no issues found.
So far it seems I have managed to get it work with some carefuly placed DoEvents statements.
But the code would crash on really weird places such as

if v = vbnullstring then goto NextS (v is Variant)

the sub containing this line is run several times during the problematic part, but only once causes excel to crash and only on 1 PC. putting DoEvents before the statement seems to have fixed the problem.
 
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,799
Members
449,337
Latest member
BBV123

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