Hi, I am new to the world of VB and am writing a code in which i call another function and attempt to print a value in the original form. When I run the program, I can imput all of the numbers, and it does call the other program, but it will not print and gives the message "Method not valid without suitable object." I've searched this topic online and tried to find it in my classbook, but I'm not finding anything. So, here is what I have so far, this is a very rough draft as I do not understand much about VB...but I guess that is how life goes.
CODE
Private Sub cmdenternumbers_Click()
Dim i As Integer
Dim number As Single
For i = 1 To 10
number = InputBox("Enter number")
Print vbTab & number
Next i
Call Mean(x())
Cls
Print
For i = 1 To 10
Print vbTab & x(i)
Next i
Print
End Sub
AND HERE IS THE other module that is called by the main program
Public Function Mean(x() As Single)
Dim total As Single
Dim average As Single
For i = 1 To 10
total = total + (x(i))
Next i
Print total
End Function
If you've got any good advice, please post a reply or catch me online. AIM screenname = starrz8600
And thanks so much!