Hi all. First I would like to apologize for what I am sure will turn into the first of many questions about this language that have very simple answers. I am currently taking a Visual Basic course in college and we just got our first homework assignment. I built the interface and then started inputting code for a command button. ItÂ’s intended to take the name of a Baseball team, their number of wins and their number of losses then, when the cmd button is clicked; itÂ’s supposed to put a statement in a picture box that tells the teams percentage of wins. Unfortunately, once thought that I was finished and executed it, it gave me a message that says "Method or Data member not found"
So my questions are:
1. What did I do wrong in my code?
2. What exactly does this error mean?
IÂ’m using VB6 working model edition which apparently doesnÂ’t come with any help files. Please feel free to point out any other potential problems that I might be having.
Since I canÂ’t attach the form file I'll just post the code here.
<code>
Private Sub cmdCompute_Click()
Dim Team As String
Dim Won As Integer
Dim Lost As Integer
Dim Total As Integer
Team = txtTeam.Text
Won = Val(txtWon.Text)
Lost = Val(txtLost.Text)
Total = Won + Lost
picPercent.Cls
picPercent.Print Team & "won"; Total / Won & "percent of its games."
End Sub
</code>