4 of 4 people found this helpful
The first thing jumping on me was that your code is not type-safe. The return of GetValue can be of different types. Comparing it against a string without evaluating its type or casting it to string is provoking a type mismatch.
My guess is that run-time error 8321 is bubbling up from VBA. The remaining question is why previous ProcessBook versions behave more tolerant. The explanation is likely due to Known Issue 22852OSI8 - GetValue function in ProcessBook automation will cause ProcessBook to crash. The fix was released with ProcessBook 2015 R2 (3.6.0) and appears to avoid the known issue described which is similar to yours.
I believe the easiest option is to cast the result of GetValue to string before comparing with a string.