티스토리 뷰

Excel VBA/VBA 예제

excel vba dictionary

KyeongRok Kim 2016. 6. 26. 15:05

key, value로 값을 뽑고 저장할 수 있는 Dictionary Object 를 만들 수 있다.


dictionary에는 또 다른 dictionary를 넣을 수 있다.


Sub dictionaryTest()

    Dim dict_list As Object

    Set dict_list = CreateObject("Scripting.Dictionary")

    

    dict_list.Add "Apples", getItem

    

    Debug.Print dict_list("Apples")("apple")

    

    

    

End Sub



Function getItem()


Dim dict_item As Object

    Set dict_item = CreateObject("Scripting.Dictionary")

    dict_item.Add "apple", 1


Set getItem = dict_item

End Function


728x90
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함