I wanted to use it with TextChange event of a Textbox.
Private Sub tbAlm_TextChanged(sender As Object, e As EventArgs) Handles tbAlm.TextChanged
ModbusTCPCom1.Write(40016, 100)
End Sub
The above error pops, when I hit F5 to start the app.
When I do it the same with a button click event, everything works.
Thanks