You are on page 1of 3

Private Sub Command1_Click()

Dim a11, a12, a13, a21, a22, a23, a24, a31, a32, a33, a34 As Double

Dim b21, b22, b23, b24, b31, b32, b33, b34 As Double

Dim c31, c32, c33, c34 As Double

Dim u1, u2, u3, x1, x2, x3 As Double

a11 = Text1.Text

a12 = Text2.Text

a13 = Text3.Text

a14 = Text4.Text

a21 = Text5.Text

a22 = Text6.Text

a23 = Text7.Text

a24 = Text8.Text

a31 = Text9.Text

a32 = Text10.Text

a33 = Text11.Text

a34 = Text12.Text

u1 = a21 / a11

b21 = a21 - (u1 * a11)

b22 = a22 - (u1 * a12)

b23 = a23 - (u1 * a13)

b24 = a24 - (u1 * a14)

u2 = a31 / a11

b31 = a31 - (u2 * a11)

b32 = a32 - (u2 * a12)


b33 = a33 - (u2 * a13)

b34 = a34 - (u2 * a14)

u3 = b32 / b22

c31 = 0

c32 = b32 - (u3 * b22)

c33 = b33 - (u3 * b23)

c34 = b34 - (u3 * b24)

x3 = c34 / c33

x2 = (b24 - (b23 * x3)) / b22

x1 = (a14 - (a13 * x3) - (a12 * x2)) / a11

Text25.Text = x1

Text26.Text = x2

Text27.Text = x3

MsgBox "selamat", vbMsgBoxHelpButton, INFO

End Sub

Private Sub Command2_Click()

Text1.Text = Clear

Text2.Text = Clear

Text3.Text = Clear
Text4.Text = Clear

Text5.Text = Clear

Text6.Text = Clear

Text7.Text = Clear

Text8.Text = Clear

Text9.Text = Clear

Text10.Text = Clear

Text11.Text = Clear

Text12.Text = Clear

Text25.Text = Clear

Text26.Text = Clear

Text27.Text = Clear

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

You might also like