VBA macro causes Excel crash

mintz

Board Regular
Joined
Aug 5, 2015
Messages
129
I recently started getting errors when clicking a custom Ribbon shortcut (which runs a few macros)

The code involves opening, closing, saving, deleting workbooks, also copying to and copying from other workbooks

Code:
Description:  A problem caused this program to stop interacting with Windows.


Problem signature:
  Problem Event Name:    AppHangB1
  Application Name:    EXCEL.EXE
  Application Version:    15.0.4420.1017
  Application Timestamp:    506741b5
  Hang Signature:    6acb
  Hang Type:    0
  OS Version:    6.1.7601.2.1.0.256.1
  Locale ID:    1037
  Additional Hang Signature 1:    6acb5e8afc59fd5d0f16b73953ad555b
  Additional Hang Signature 2:    94d6
  Additional Hang Signature 3:    94d63882b3db19ba84c338ce0a96f1fe
  Additional Hang Signature 4:    6acb
  Additional Hang Signature 5:    6acb5e8afc59fd5d0f16b73953ad555b
  Additional Hang Signature 6:    94d6
  Additional Hang Signature 7:    94d63882b3db19ba84c338ce0a96f1fe


Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409


If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

The error above happens almost every time I open the workbook and run the code for the first time after PC restart. It causes Excel to crash, then I reopen the workbook, rerun the code and the error doesn't happen anymore. But it will happen the next time I restart PC and so on


Code:
Problem signature:  Problem Event Name:    APPCRASH
  Application Name:    EXCEL.EXE
  Application Version:    15.0.4420.1017
  Application Timestamp:    506741b5
  Fault Module Name:    VBE7.DLL
  Fault Module Version:    7.1.10.38
  Fault Module Timestamp:    4fea3eec
  Exception Code:    c0000005
  Exception Offset:    00000000000412fc
  OS Version:    6.1.7601.2.1.0.256.1
  Locale ID:    1037


Additional information about the problem:
  LCID:    1033
  skulcid:    1037

The error above happened a few days ago, for some reason I don't get that error anymore but I am thinking it might tell where the problem lies?

I only started getting these errors during the past week after I made some improvements in the code and added some more macros (all are run by clicking that custom Ribbon button)

What could possibly be wrong with my code or it has to do with Excel settings? Or how do I know what line in my code triggers the error?
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I think you do not have a problem in a line, because the application just hang (AppHangB1) stooped working or probably slowed down and crossed some threshold time out limit
that is to say your machine is too busy for the job
or the macro has gotten too big for your machine
Cheers
Sergio
 
Upvote 0
I think you do not have a problem in a line, because the application just hang (AppHangB1) stooped working or probably slowed down and crossed some threshold time out limit
that is to say your machine is too busy for the job
or the macro has gotten too big for your machine
Cheers
Sergio

Thanks for the input
I forgot to mention the code includes downloading data through API
I'm not sure it's a slow down because it just gets stuck and nothing would happen until I kill the Excel process from the task manager
The second time I run the code it works without a hitch (taking 1-2 sec to complete)
This only occurs the first time I run the code after windows launch
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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