回答編集履歴

1

追記

2020/12/06 10:21

投稿

Y.H.
Y.H.

スコア7918

test CHANGED
@@ -36,8 +36,60 @@
36
36
 
37
37
 
38
38
 
39
+ 結果
40
+
39
41
  ```console
40
42
 
41
43
  val1とval2
42
44
 
43
45
  ```
46
+
47
+
48
+
49
+ ItemにDictionaryをセットする事も可能です。
50
+
51
+
52
+
53
+ ```VBA
54
+
55
+ Dim dic As Object
56
+
57
+ Set dic = CreateObject("Scripting.Dictionary")
58
+
59
+
60
+
61
+ ' set two Values.
62
+
63
+ Dim vals As Object
64
+
65
+ Set vals = CreateObject("Scripting.Dictionary")
66
+
67
+ vals.Add "E", "val1"
68
+
69
+ vals.Add "F", "val2"
70
+
71
+ dic.Add "key1", vals
72
+
73
+
74
+
75
+ ' get two Values.
76
+
77
+ Dim outVals As Object
78
+
79
+ Set outVals = dic.Item("key1")
80
+
81
+
82
+
83
+ Debug.Print outVals.Item("E") & "と" & outVals.Item("F")
84
+
85
+ ```
86
+
87
+
88
+
89
+ 結果
90
+
91
+ ```console
92
+
93
+ val1とval2
94
+
95
+ ```