Hello!
I have an error that pops up intermittently with seemingly no cause. The code that triggers it is here (the last line is the actual trigger):
The Debug.Print gives me "Error 2029" for the value of [A1_Period]. When the code is running, the error message that pops up is number 13 Type mismatch. The confusing thing is, [A1_Period] refers to a cell that has not changed in value, but sometimes this error happens and sometimes it does not. The cell contains a formula: =COUNTIF(E15:E17,TRUE). The calculation is working just fine. Anyone know why this error happens sometimes but not others? Thanks!
Edited to add: By the way, if I execute the code again after it bombs, without making any changes, it works fine. ????
I have an error that pops up intermittently with seemingly no cause. The code that triggers it is here (the last line is the actual trigger):
Code:
Public Sub TestA1()
On Error GoTo Err_TestA1
'only one fatal error is possible
Debug.Print [A1_Period]
If [A1_Period] <> 1 Then
The Debug.Print gives me "Error 2029" for the value of [A1_Period]. When the code is running, the error message that pops up is number 13 Type mismatch. The confusing thing is, [A1_Period] refers to a cell that has not changed in value, but sometimes this error happens and sometimes it does not. The cell contains a formula: =COUNTIF(E15:E17,TRUE). The calculation is working just fine. Anyone know why this error happens sometimes but not others? Thanks!
Edited to add: By the way, if I execute the code again after it bombs, without making any changes, it works fine. ????
Last edited: