Thanks both. You’re right: this isn’t a compiler bug as such. The warning is about the overall control-flow complexity of the method, so there isn’t always one single “bad” line.
That said, the current UX was too vague, especially when Studio reports it against a hidden control event declaration like Window1 ListBox1.Opening declaration.
I’ve changed this for the next release (https://feedback.objo.dev/bug/433).
The warning will now include the score and threshold, plus the largest contributor, for example a long ElseIf chain or large Select Case. Studio will also point/navigate to that visible contributor line inside the handler instead of just showing the declaration.
The method complexity warning can be switched off in Settings > Analyser > Complexity warnings > Method complexity. I haven’t made the numeric threshold configurable yet, but I agree that may be useful if people want this warning enabled but tuned differently.