错误“438”求指导
求大神指导看看代码错哪里了,怎么改Rem*****************************************
Private Sub Form_load()
cmdDelete.Enabled = True
End Sub
Private Sub cmdSave_Click()
Dim mname As String, mesx As String
Dim mscore As String
mname = Left(LTrim(txtName.Text) + Space(5), 5)
If (Len(RTrim(mname)) = 0) Then
MsgBox ("姓名不能为空!请重新输入。")
txtName.SetFocus
Exit Sub
End If
msex = IIf(OptMale.Value, "男", "女")
mscore = Left(Str(Val(TxtScore.Text)) + Space(6), 6)
lstStudent.AddItem mname & "" & msex & "" & mscore??实时错误“438”,对象不支持该属性或方法
txtName.Text = ""
OptMale.Value = True
TxtScore.Text = ""
txtName.SetFocus
End Sub
Private Sub lstStudent_Click()
cmdDelete.Enabled = True
End Sub
Private Sub cmdDelete_Click()
Dim mname As String
If (lstStudent.ListIndex < 0) Then
MsgBox ("还没有选择要删除的对象!")
Else
mname = RTrim(Left(istStudent.List(lstStudent.ListIndex), 4))
lstStudent.RemoveItem lstStudent.ListIndex
MsgBox ("""&mname&""已被删除! ")
End If
cmdDelete.Enabled = False
End Sub
Private Sub cmdExit_Click()
End
End Sub
Rem*******************************************