如何将此代码放入按钮中我已经尝试了所有我知道的内容
Private Function NewAward(Mark As Double) As String
Select Case Mark
Case 90 To 100
Return "High Distinction"
Case 75 To 89
Return "Distinction"
Case 60 To 74
Return "Credit"
Case 50 To 59
Return "Pass"
Case Else
Return "Participation"
End Select
End Function
答案 0 :(得分:1)
如果您需要按钮来使用此文本,请尝试以下方式:
Button1.Text = NewAward(73)
这就是你想要的吗?
如果要更改按下按钮时执行的代码:
Sub Button1Click(sender As Object, e As EventArgs) Handles Button1.Click
'Your code
End Sub