0% found this document useful (0 votes)
15 views

Private Sub Pbutton

The document contains code for two forms with buttons that perform calculations based on text box input values and display the results, and buttons that clear the text boxes or close and reopen the first form.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Private Sub Pbutton

The document contains code for two forms with buttons that perform calculations based on text box input values and display the results, and buttons that clear the text boxes or close and reopen the first form.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Private Sub Button1_Click(ByVal sender As System.

Object, ByVal e As
System.EventArgs) Handles Button1.Click
A = Val(TextBox1.Text)
B = Val(TextBox2.Text)
C = Val(TextBox3.Text)
TSAT = Val(TextBox4.Text)
PSAT = System.Math.E ^ (A - B / (T + C))
TextBox5.Text = PSAT
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Me.Hide()
Form1.Show()
End Sub
End Class

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
H = Val(TextBox1.Text)
PH = -System.Math.Log10(H)
TextBox2.Text = PH
POH = 14 - PH
TextBox3.Text = POH
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Me.Hide()
Form1.Show()
End Sub

You might also like