在VB6中使用集合

前端之家收集整理的这篇文章主要介绍了在VB6中使用集合前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
导入Microsoft Scripting Runtime库
Private Sub CommandButton1_Click()

    Dim d2 As Scripting.Dictionary
    Dim i As Integer
    
    Set d2 = New Scripting.Dictionary
    d2.Add 1,"11111"
    d2.Add 2,"22222"
    d2.Add 3,"33333"
    For i = 0 To d2.Count - 1
        MsgBox d2.item(i + 1)
    Next i
    
    MsgBox "OK"
    
End Sub
原文链接:https://www.f2er.com/vb/260215.html

猜你在找的VB相关文章