Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User-defined type not defined

Status
Not open for further replies.

chouna

Programmer
Mar 28, 2003
75
DE
Public Function grade(mark As Variant) As Sting
Select Case mark
Case Is >= 80
grade = "A"
Case Is >= 70
grade = "B"
Case Is >= 60
grade = "C"
Case Is >= 50
grade = "D"
Case Is >= 40
grade = "E"
Case Else
grage = "F"
End Select

End Function

Private Sub Compute_Click()
grading.Caption = grade(mark)
End Sub

Private Sub End_Click()
End
End Sub
 
Replace this:
As Sting
with this:
As String

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
In case you've not noticed, there's a minor typo in your grade F line too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top