Casting a window add a blank one


In a project, I added a MenuItem to access directly to the Download window and put the code below:

[code] Dim w As New wUtils

If Window(0) IsA wLibgenUtils Then
w = wUtils(Window(0))

Return False
End If

If w.LB.ListIndex = -1 Then
w.TF_Report.Text = “Please, choose an URL to download first.”

End If

Return True[/code]

It works fine excepted that it adds an empty window.

What do I do wrong (not the code design please).

The problem is this line

Dim w As New wUtils

Take out “New” so it doesn’t instantiate a new window. It should be just

Dim w As wUtils

Stupid, Stupid me !!!

Willing doing things correctly makes me doing wrong…

Thank You Tim.