Public Class frmCommand
Private Sub Command1_Click()
Dim txtInput1 As Double
Dim txtInput2 As Integer
Dim txtInput As Integer
Dim Sum As Integer
Dim Average As Integer
Dim Larger As Integer
Dim Smallest As Integer
Sum.Caption = "Sum : " & (Val(txtInput1.Text) + Val(txtInput2.Text) + Val(txtInput3.Text))
Average.Caption = "Average : " & ((Val(txtInput1.Text) + Val(txtInput2.Text) + Val(txtInput3.Text)) / 3)
If Val(txtInput1.Text) < Val(txtInput2.Text) And Val(txtInput1.Text) < Val(txtInput3.Text) Then
Smallest.Caption = "Smallest : " & Text1.Text
ElseIf Val(txtInput2.Text) < Val(txtInput1.Text) And Val(txtInput2.Text) < Val(3.Text) Then
Smallest.Caption = "Smallest : " & txtInput2.Text
ElseIf Val(txtInput3.Text) < Val(txtInput1.Text) And Val(txtInput3.Text) < Val(txtInput1.Text) Then
Smallest.Caption = "Smallest : " & txtInput3.Text
End If
If Val(txtInput1.Text) > Val(txtInput2.Text) And Val(txtInput1.Text) > Val(txtInput3.Text) Then
Larger.Caption = "Larger : " & txtInput1.Text
ElseIf Val(txtInput2.Text) > Val(txtInput1.Text) And Val(txtInput2.Text) > Val(txtInput3.Text) Then
Larger.Caption = "Larger : " & txtInput2.Text
ElseIf Val(txtInput3.Text) > Val(txtInput1.Text) And Val(txtInput3.Text) > Val(txtInput1.Text) Then
Larger.Caption = "Larger : " & txtInput3.Text
End If
End Sub
End Class
Here are my compile errors
Error 1 'Caption' is not a member of 'Integer'. l 13 9
Error 2 'Text' is not a member of 'Double'. 13 39
Error 3 'Text' is not a member of 'Integer'. 13 61