0

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?

JA12
  • 61
  • 1
  • 4
  • 12
  • Then delete your question instead of leaving the clutter behind. – Ken White Dec 17 '14 at 17:11
  • Not sure what your doing. Try this instead `Dim fclm As frmNewClaim = GetOpenForm(fclm)` – Steve Dec 17 '14 at 17:49
  • It's a subroutine. I'd have to change over a hundred other lines that are pretty much identical, that work to "fix" this one line. – JA12 Dec 18 '14 at 09:30

0 Answers0