新手求助---查不出错误
Private Sub Text1_Change()If Len(Text1.Text) < 7 Then
cmdCheck.Enabled = False------此处报错
Else
cmdCheck.Enabled = True
End If
End Sub
Private Sub cmdCheck_Click()
Dim RNum As String, JNo As String
Dim str As String
Randomize
RNum$ = Format(Int(Rnd * 9000000 + 1000000), "0000000")
Picture1.Cls
JNo = Text1.Text
If JNo = RNum Then
str = "Congratulations!You have won the first prize"
ElseIf Right(JNo, 6) = Right(RNum, 6) Then
str = "second Prize"
ElseIf Right(JNo, 5) = Right(RNum, 5) Then
str = "third Prize"
ElseIf Right(JNo, 4) = Right(RNum, 4) Then
str = "forth Prize"
ElseIf Right(JNo, 3) = Right(RNum, 3) Then
str = "fifth Prize"
ElseIf Right(JNo, 2) = Right(RNum, 2) Then
str = "sixth Prize"
ElseIf Right(JNo, 1) = Right(RNum, 1) Then
str = "Last Prize"
Else
str "Welcome"
End If
Picture1.Print "the correct number is:" & RNum
Picture1.Print "your number is:" & JNo
Picture1.Print str
Text1.Text = ""
Text1.SetFocus
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii <> 13 Then
Select Case KeyAscii
Case 48 To 57, 8
Case Else
KeyAscii = 0
End Select
Else
If Len(Text1.Text) = 7 Then
cmdCheck_Click
End If
End If
End Sub
我们学院有一个课程是把学生分成若干组,研究不同的课题,有点类似与做一个小项目,我们题目是小型的病人管理系统
现在同学在操作界面使用java还是vb出现了小分歧,我主张用vb,简单实用,java虽然现在是很流行,但是对于这样一个只有9周时间的小课程来说,我觉得有点小题大作了,vb足够应付,况且还要和数据库链接。。。平时上课也没有那么多时间,我觉得主要就是体验下,做项目的感觉,所以没必要没日没夜的研究java
大家看看我有什么办法能够说服同学使用VB,也可以提下,谢谢啦