Strange Excel Crashes

asw122

New Member
Joined
Jun 25, 2018
Messages
2
Hi all,

So I'm working on improving my ability to write and understand macros (I'm entirely self-taught in excel, so I figure why change that now?). Basically writing Macros, then looking for ways to make them better/faster.

Anyway, when I'm designing subs and functions, I put watches on the variables so that I can step through and see what's happening.

Strange thing is that sometimes, Excel crashes when adding watches. Even stranger, it only happens when I put a watch on a second variable. So say I have variables a & b:

Watch variable a, but not b = fine
Watch variable b, but not a = fine
Watch variable a, then add a watch to variable b = crash
Watch variable b, then add a watch to variable a = crash

It seems to happen a few times, then suddenly, its OK. I could understand if I was trying to actually run the code and there was a flaw, but this is literally me adding watches (and they're the only watches, nothing else in the watch window) - I haven't actually written any real code yet - just the dim statements to define the variables, and a for loop without anything in it yet.

Is this something anyone has encountered? Am I doing something unknowingly which could be causing this, or is it more likely a case that excel needs a repair install or something similar?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi asw122,

I commend you on your efforts to learn VBA. But these issues can be from anywhere. Stack issues, memory issues, you did not say if you are working on Windows, or the Mac version, or what version is running. Try and rebuild the workbook, and possibly restart the computer and don’t do anything but this test. No applications running, see if it is that kind of issue that stems from the OS itself.
 
Upvote 0
Hi asw122,

I commend you on your efforts to learn VBA. But these issues can be from anywhere. Stack issues, memory issues, you did not say if you are working on Windows, or the Mac version, or what version is running. Try and rebuild the workbook, and possibly restart the computer and don’t do anything but this test. No applications running, see if it is that kind of issue that stems from the OS itself.

Thanks PhilS.

I meant to include that yesterday, but it was 1:30am when I posteed, so my brain forgot what info actually helps people. Anyway, I'm on Windows, Office365 version (according to Excel, V. 1805, build 9330.2124). Tried the simple stuff like reboots, no other programs, etc, but no cigar. If its in anyway significant, the file is sitting in my onedrive folder with that new autosave thing on.

It did resolve itself yesterday, but to be sure, I ended up copying the sub into notepad, resaving as xlsx and then resaving as macro enabled and pasting the macro back in.
 
Upvote 0

Forum statistics

Threads
1,214,639
Messages
6,120,679
Members
448,977
Latest member
dbonilla0331

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