More problems with Excel VBA

wackywoo105

New Member
Joined
May 13, 2014
Messages
23
Office Version
  1. 365
Platform
  1. Windows
A workbook that has been running fine for years decided to fall over on Chr(13), which I fixed with vbCrLf (which I use these days but didn't a long time ago).

The following day it started crashing again on Thisworkbook.activate.

These are complete crashes, not vba end/debug errors.

I found the issues by adding stop and stepping through the code until the crash.

Why would something like this just suddenly start acting up? Some of the code is around 10 years old.

I'm getting fed up of putting out one fire only to encounter another soon after.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
If it is just this one workbook crashing then possibly it has become corrupted. Would you be able to revert to a recent 'good' back-up and go from there?

BTW, I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Does chr(13) give you a compile error by any chance?
Two things to try:
  1. From the VBA Editor, choose Tools, References. Do any show "MISSING"?
  2. Try cleaning the VBA code by exporting all modules, deleting them and importing them again.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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