如何给这段程序添加一个词组上限?
Private Sub Command2_Click(Index As Integer)'词组操作
Dim strVa As String
Dim k As Integer
Select Case Index
Case 0 '探头
If Text1(0).Text = "" Then Exit Sub
Load F_Px '排序
'向词表添加新词
Keytext1_0
这里如何添加一个词组上限 我这个写法对吗
if i_czs>5000 then i_czs 为声明的词组数
msgbox "词组超上限,禁止添加!",32,"提示"
end if
Case 1 '模块
If Text1(1).Text = "" Then Exit Sub
Load F_Px '排序
'向词表添加新词
Keytext1_1
这里和上面一样
if i_czs>5000 then
msgbox"词组数超上限,禁止添加!",32,"提示"
end if
Case 2 '探头词修改
If Text1(0).Text = "" Then Exit Sub
If List1(0).Text = "" Then
Else
v_Word_Rcd.MoveFirst
v_Word_Rcd.FindFirst "ino=" & UCase(Left(List1(0).Text, 4))
v_Word_Rcd.Edit
v_Word_Rcd.Fields("cz").Value = Trim(Text1(0).Text)
v_Word_Rcd.Update
List1(0).List(List1(0).ListIndex) = UCase(Left(List1(0).Text, 4)) & " " & Text1(0).Text
MSFGd1(0).TextMatrix(MSFGd1(0).Row, 1) = v_Word_Rcd.Fields("cz").Value
'组合键跳格输入
If ZHJA = True Then
For k = 1 To MSFGd1(0).Rows - 1
If MSFGd1(0).TextMatrix(k, 1) = " " Then
MSFGd1(0).TextMatrix(k, 1) = v_Word_Rcd.Fields("cz").Value
End If
Next k
End If
'数组清零
ZHJA = False
End If
Case 3 '模块词修改
If Text1(1).Text = "" Then Exit Sub
If List1(1).Text = "" Then
Else
v_Word_Rcd.MoveFirst
v_Word_Rcd.FindFirst "ino=" & UCase(Left(List1(1).Text, 4))
v_Word_Rcd.Edit
v_Word_Rcd.Fields("cz").Value = Trim(Text1(1).Text)
v_Word_Rcd.Update
List1(1).List(List1(1).ListIndex) = UCase(Left(List1(1).Text, 4)) & " " & Text1(1).Text
MSFGd1(1).TextMatrix(MSFGd1(1).Row, 1) = v_Word_Rcd.Fields("cz").Value
'组合键跳格输入
If ZHJA = True Then
For k = 1 To MSFGd1(1).Rows - 1
If MSFGd1(1).TextMatrix(k, 1) = " " Then
MSFGd1(1).TextMatrix(k, 1) = v_Word_Rcd.Fields("cz").Value
End If
Next k
End If
ZHJA = False
End If
End Select
End Sub
那位大神知道 请指教,别的参数暂且不提 就给commad2按钮添加词组上限