try this

Code:
Private Sub Form_Load()
ws.Close
ws.Connect "192.168.1.11",1007
End Sub