Dim Cle As Collection
Dim sendMe As Integer
Dim Message(1 To 900) As Variant
Dim Sum() As Variant
Private Sub Combo1_Click()
If Len(Combo1.Text) = 5 Then
sendMe = Val((Right(Combo1.Text, 1)))
ElseIf Len(Combo1.Text) = 6 Then
sendMe = Val((Right(Combo1.Text, 2)))
Else
sendMe = Val((Right(Combo1.Text, 3)))
End If
For i = 1 To 6 * sendMe
'ReDim Sum(1 To 6 * sendMe)
Message(i) = "Message(" & i & ")"
Combo2.AddItem i
Next
End Sub
Private Sub Command1_Click()
For i = 1 To Cle.Count
Text1.Text = Text1.Text & Message(i) & Cle.Item(i) & vbCrLf
Next
End Sub
Private Sub Command2_Click()
On Error GoTo err457:
Cle.Add Combo3.Text, Combo2.Text
err457:
If Err.Number = 457 Then
MsgBox "此项已输入", vbInformation, "提示"
End If
End Sub
Private Sub Form_Load()
For i = 1 To 150
Combo1.AddItem "page" & i
Next
Combo3.AddItem "&H1"
Combo3.AddItem "&HA"
Combo3.AddItem "&H7"
Combo3.AddItem "&H5"
Combo3.AddItem "&H3"
Combo3.AddItem "&H9"
Set Cle = New Collection
End Sub
看看是不是这样的!