Private Sub cmdOkCancel_Click(Index As Integer)
Select Case Index
Case 0
mAddEditId = "": mAddEditIdName = ""
mAddEditIdClass = "": mAddEditIdDepart = ""
mAddEditIdZhi = ""
If txtBookId.Text = "" Or txtBookIdName = "" Then
' Or txtBookIdDepart = "" Or txtBookIdZhi = "" Then
MsgBox "请把借书证号或姓名填写完整!", 0 + 48, "提示"
Exit Sub
End If
mAddEditId = txtBookId
mAddEditIdName = txtBookIdName
mAddEditIdClass = txtBookIdClass
mAddEditIdDepart = txtBookIdDepart
mAddEditIdZhi = txtBookIdZhi
Unload Me
mSave = True
Case 1
mSave = False
Unload Me
End Select
End Sub请问mAddEditId = "": mAddEditIdName = "" 中前面为什么加m ?
Select Case Index
Case 0
mAddEditId = "": mAddEditIdName = ""
mAddEditIdClass = "": mAddEditIdDepart = ""
mAddEditIdZhi = ""
If txtBookId.Text = "" Or txtBookIdName = "" Then
' Or txtBookIdDepart = "" Or txtBookIdZhi = "" Then
MsgBox "请把借书证号或姓名填写完整!", 0 + 48, "提示"
Exit Sub
End If
mAddEditId = txtBookId
mAddEditIdName = txtBookIdName
mAddEditIdClass = txtBookIdClass
mAddEditIdDepart = txtBookIdDepart
mAddEditIdZhi = txtBookIdZhi
Unload Me
mSave = True
Case 1
mSave = False
Unload Me
End Select
End Sub请问mAddEditId = "": mAddEditIdName = "" 中前面为什么加m ?
另外,除了楼上那些外,还可以用变量类型的第一个字母放在开头来定义,一眼就可以看出变量的类型。比如:字符串变量sName,sDet;长整型变量lData,lNum等。
楼主的代码会不会引用的控件是MaskEdBox1,所以前面都加了一个m呵呵