I couldn't have that code work but this one did work:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As MsgBoxResult = MsgBox("Are you sure?", Microsoft.VisualBasic.MsgBoxStyle.YesNo)
If result = MsgBoxResult.Yes Then
EthernetIPforPLCSLCMicroCom1.Write("B3/100", "1")
End If
End Sub