When the textboxes are 49 below or 100 above the message should be "Invalid Grade Input".
When the textboxes are blank the message should be " No Grade Input".
When the textboxes are 49 below or 100 above and there are some textboxes that are blank it should be " Invalid Grade Input ".
When the textboxes are 50-100 and some are blanks it should be " No Grade Input "
pls help :'(

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Then
            MessageBox.Show("No Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

        Else

            If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or Val(TextBox4.Text) < 50 Or Val(TextBox4.Text) > 100 Then
                MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

            ElseIf TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox4.Text = "" Or Val(TextBox3.Text) < 50 Or Val(TextBox3.Text) > 100 Then
                MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

            ElseIf TextBox1.Text = "" Or TextBox4.Text = "" Or TextBox3.Text = "" Or Val(TextBox2.Text) < 50 Or Val(TextBox2.Text) > 100 Then
                MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

            ElseIf TextBox4.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or Val(TextBox1.Text) < 50 Or Val(TextBox1.Text) > 100 Then
                MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

            ElseIf Val(TextBox1.Text) < 50 Or Val(TextBox1.Text) > 100 Or Val(TextBox2.Text) < 50 Or Val(TextBox2.Text) > 100 Or Val(TextBox4.Text) < 50 Or Val(TextBox4.Text) > 100 And Val(TextBox3.Text) < 50 Or Val(TextBox3.Text) > 100 Then
                MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)


            Else
                Label6.Text = (((Val(TextBox1.Text) + Val(TextBox2.Text)) / 2) * 0.4) + (Val(TextBox3.Text) * 0.1) + (Val(TextBox4.Text) * 0.5)
            End If
        End If


    End Sub

I believe this is what you want, you had all the rigt stuff I just moved the first if (stuff) to the bottom elseif (stuff)

If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or Val(TextBox4.Text) < 50 Or Val(TextBox4.Text) > 100 Then
            MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

        ElseIf TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox4.Text = "" Or Val(TextBox3.Text) < 50 Or Val(TextBox3.Text) > 100 Then
            MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

        ElseIf TextBox1.Text = "" Or TextBox4.Text = "" Or TextBox3.Text = "" Or Val(TextBox2.Text) < 50 Or Val(TextBox2.Text) > 100 Then
            MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

        ElseIf TextBox4.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or Val(TextBox1.Text) < 50 Or Val(TextBox1.Text) > 100 Then
            MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

        ElseIf Val(TextBox1.Text) < 50 Or Val(TextBox1.Text) > 100 Or Val(TextBox2.Text) < 50 Or Val(TextBox2.Text) > 100 Or Val(TextBox4.Text) < 50 Or Val(TextBox4.Text) > 100 And Val(TextBox3.Text) < 50 Or Val(TextBox3.Text) > 100 Then
            MessageBox.Show("Invalid Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        ElseIf TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Then
            MessageBox.Show("No Grade Input!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

        Else
            Label6.Text = (((Val(TextBox1.Text) + Val(TextBox2.Text)) / 2) * 0.4) + (Val(TextBox3.Text) * 0.1) + (Val(TextBox4.Text) * 0.5)
        End If
        ' End If


    End Sub

it always prompt the message Invalid Grade Input.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.