The simplest way is to add a numeric up/down from the ToolBox to your form, then double click it to get back to the code, then add this code:
Private Sub NumericUpDown1_ValueChanged(sender As System.Object, e As System.EventArgs) Handles NumericUpDown1.ValueChanged
ModbusTcpCom1.Write("40001", NumericUpDown1.Value)
End Sub