I have a workbook which creates a new file from template. At one particular step I need a "Channel Count" which is held in formula on the settings sheet of the creator.
This is the code that crashes Excel:
Dim ChCount%
ChCount% = Sheet3.Cells(11, 8).Value
Annoyingly, this works (but obviously not in the long run as this number is dynamic):
Dim ChCount%
'ChCount% = Sheet3.Cells(11, 8).Value
ChCount% = 2
Even more annoyingly, this is only affecting the "24h" version of my tool. I have a "standard" version using the exact same code and it's still working normally. I have no idea what is going on... Excel just full hard crashes, no error codes, and resets with a bunch of "Repaired" files.
Edit: In case it helps this is the formula in the targeted cell... it simply counts Yes or No how many channels out of 8 max it can have. In this example it should be returning "2":
=IF(LEN(H3)>0,1,0)+IF(LEN(H4)>0,1,0)+IF(LEN(H5)>0,1,0)+IF(LEN(H6)>0,1,0)+IF(LEN(H7)>0,1,0)+IF(LEN(H8)>0,1,0)+IF(LEN(H9)>0,1,0)+IF(LEN(H10)>0,1,0)
I know that formula isn't "great" but it's been working fine for literally years...