I've got a weird one here. I'm getting the compiler error "Unused local variable" for a variable that is used!
If bUpdate Then
Dim fclm As New frmNewClaim : GetOpenForm(fclm)
With fclm ' <-------------------
.something = x
End With
End If
The sub GetOpenForm just attaches to a form if it is already open
I have the exact same code (the Dim/With) in other parts of the application that are not being complained about. I've tried recompiling, but the error remains.
What is going on here?