Private Sub TextBox13_TextChanged(sender As Object, e As EventArgs) Handles TextBox13.TextChanged Dim calc As Integer Dim tot As Integer Try If TextBox13.Text = "General Ward" Then s = Val(Me.TextBox1.Text) Me.TextBox16.Text = gm Me.TextBox15.Text = dr Me.TextBox14.Text = nr calc = (Val(Me.TextBox14.Text) + Val(Me.TextBox15.Text) + Val(Me.TextBox16.Text) + Val(Me.TextBox17.Text)) tot = calc * s ElseIf TextBox13.Text = "ICU" Then s = Val(Me.TextBox1.Text) Me.TextBox16.Text = icu Me.TextBox15.Text = dr Me.TextBox14.Text = nr calc = (Val(Me.TextBox14.Text) + Val(Me.TextBox15.Text) + Val(Me.TextBox16.Text) + Val(Me.TextBox17.Text)) tot = calc * s ElseIf TextBox13.Text = "Room" Then s = Val(Me.TextBox1.Text) Me.TextBox16.Text = rm Me.TextBox15.Text = dr Me.TextBox14.Text = nr calc = (Val(Me.TextBox14.Text) + Val(Me.TextBox15.Text) + Val(Me.TextBox16.Text) + Val(Me.TextBox17.Text)) tot = calc * s End If TextBox22.Text = tot Catch ex As Exception MsgBox("ERROR : " & ex.Message.ToString) End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)