Public Class Form1
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then txt1.Visible = True Else txt1.Visible = False
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
If CheckBox2.Checked = True Then txt2.Visible = True Else txt2.Visible = False
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
If CheckBox3.Checked = True Then txt3.Visible = True Else txt3.Visible = False
End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
If CheckBox4.Checked = True Then txt4.Visible = True Else txt4.Visible = False
End Sub
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
If CheckBox5.Checked = True Then txt5.Visible = True Else txt5.Visible = False
End Sub
Private Sub CheckBox6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox6.CheckedChanged
If CheckBox6.Checked = True Then txt6.Visible = True Else txt6.Visible = False
End Sub
Private Sub CheckBox7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox7.CheckedChanged
If CheckBox7.Checked = True Then txt7.Visible = True Else txt7.Visible = False
End Sub
Private Sub CheckBox8_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox8.CheckedChanged
If CheckBox8.Checked = True Then txt8.Visible = True Else txt8.Visible = False
End Sub
Private Sub CheckBox9_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox9.CheckedChanged
If CheckBox9.Checked = True Then txt9.Visible = True Else txt9.Visible = False
End Sub
Private Sub CheckBox10_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox10.CheckedChanged
If CheckBox10.Checked = True Then txt10.Visible = True Else txt10.Visible = False
End Sub
Private Sub CheckBox11_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox11.CheckedChanged
If CheckBox11.Checked = True Then txt11.Visible = True Else txt11.Visible = False
End Sub
Private Sub CheckBox12_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox12.CheckedChanged
If CheckBox12.Checked = True Then txt12.Visible = True Else txt12.Visible = False
End Sub
Private Sub CheckBox13_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox13.CheckedChanged
If CheckBox13.Checked = True Then txt13.Visible = True Else txt13.Visible = False
End Sub
Private Sub CheckBox14_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox14.CheckedChanged
If CheckBox14.Checked = True Then txt14.Visible = True Else txt14.Visible = False
End Sub
Private Sub CheckBox15_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox15.CheckedChanged
If CheckBox15.Checked = True Then txt15.Visible = True Else txt15.Visible = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim mssg As String
Dim totalprice As Integer
mssg = "QTY DESCRIPTION PRICE TOTAL" + vbCr
If CheckBox1.Checked = True Then
mssg += txt1.Text & " " & CheckBox1.Text & " " & Label3.Text & " " & (Label3.Text * txt1.Text).ToString & vbCr
totalprice += Label3.Text * txt1.Text
End If
If CheckBox2.Checked = True Then
mssg += txt2.Text & " " & CheckBox2.Text & " " & Label4.Text & " " & (Label4.Text * txt2.Text).ToString & vbCr
totalprice += Label4.Text * txt2.Text
End If
If CheckBox3.Checked = True Then
mssg += txt3.Text & " " & CheckBox3.Text & " " & Label5.Text & " " & (Label5.Text * txt3.Text).ToString & vbCr
totalprice += Label5.Text * txt3.Text
End If
If CheckBox4.Checked = True Then
mssg += txt4.Text & " " & CheckBox4.Text & " " & Label6.Text & " " & (Label6.Text * txt4.Text).ToString & vbCr
totalprice += Label6.Text * txt4.Text
End If
If CheckBox5.Checked = True Then
mssg += txt5.Text & " " & CheckBox5.Text & " " & Label7.Text & " " & (Label7.Text * txt5.Text).ToString & vbCr
totalprice += Label7.Text * txt5.Text
End If
If CheckBox6.Checked = True Then
mssg += txt6.Text & " " & CheckBox6.Text & " " & Label9.Text & " " & (Label9.Text * txt6.Text).ToString & vbCr
totalprice += Label9.Text * txt6.Text
End If
If CheckBox7.Checked = True Then
mssg += txt7.Text & " " & CheckBox7.Text & " " & Label10.Text & " " & (Label10.Text * txt7.Text).ToString & vbCr
totalprice += Label10.Text * txt7.Text
End If
If CheckBox8.Checked = True Then
mssg += txt8.Text & " " & CheckBox8.Text & " " & Label11.Text & " " & (Label11.Text * txt8.Text).ToString & vbCr
totalprice += Label11.Text * txt8.Text
End If
If CheckBox9.Checked = True Then
mssg += txt9.Text & " " & CheckBox9.Text & " " & Label12.Text & " " & (Label12.Text * txt9.Text).ToString & vbCr
totalprice += Label12.Text * txt9.Text
End If
If CheckBox10.Checked = True Then
mssg += txt10.Text & " " & CheckBox10.Text & " " & Label13.Text & " " & (Label13.Text * txt10.Text).ToString & vbCr
totalprice += Label13.Text * txt10.Text
End If
If CheckBox11.Checked = True Then
mssg += txt11.Text & " " & CheckBox11.Text & " " & Label15.Text & " " & (Label15.Text * txt11.Text).ToString & vbCr
totalprice += Label15.Text * txt11.Text
End If
If CheckBox12.Checked = True Then
mssg += txt12.Text & " " & CheckBox12.Text & " " & Label16.Text & " " & (Label16.Text * txt12.Text).ToString & vbCr
totalprice += Label16.Text * txt12.Text
End If
If CheckBox13.Checked = True Then
mssg += txt13.Text & " " & CheckBox13.Text & " " & Label17.Text & " " & (Label17.Text * txt13.Text).ToString & vbCr
totalprice += Label17.Text * txt13.Text
End If
If CheckBox14.Checked = True Then
mssg += txt14.Text & " " & CheckBox14.Text & " " & Label18.Text & " " & (Label18.Text * txt14.Text).ToString & vbCr
totalprice += Label18.Text * txt14.Text
End If
If CheckBox15.Checked = True Then
mssg += txt15.Text & " " & CheckBox15.Text & " " & Label19.Text & " " & (Label19.Text * txt15.Text).ToString & vbCr
totalprice += Label19.Text * txt15.Text
End If
mssg += vbCr + vbCr
mssg += vbCr + vbCr
mssg += "Total : " & totalprice
MsgBox(txt16.Text + vbCr + mssg)
End Sub
End Class
it works perfectly fine earlier but now when I click the button the message box wouldn't appear