Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
fairly straight forward one here. Can I create a nested Dictionary structure, that is, store and retrieve Objects of type Dictionary within another Object of type Dictionary?? Also, I would be greatfull if someone could tell me where on MSDN i can find this sort of information. All I am able to find is overly simple examples using primitive data types, what I am looking for is a full API documentation similar to that which Sun provide for the Java programming language. Many thanks in advance! Alan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following may get you started.
Dim MDict As Dictionary Dim SubDict1 As Dictionary Dim SubDict2 As Dictionary Set MDict = New Scripting.Dictionary Set SubDict1 = New Scripting.Dictionary Set SubDict2 = New Scripting.Dictionary SubDict1.Add Key:="A", Item:=1 SubDict1.Add Key:="B", Item:=2 SubDict2.Add Key:="X", Item:=88 SubDict2.Add Key:="Y", Item:=99 MDict.Add Key:="SubDict1", Item:=SubDict1 MDict.Add Key:="SubDict2", Item:=SubDict2 MDict.Item("SubDict1").Add Key:="Nest1", Item:=3 MDict.Item("SubDict1").Add Key:="Nest2", Item:=4 Debug.Print MDict.Item("SubDict2").Item("X") -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) wrote in message ups.com... Hi, fairly straight forward one here. Can I create a nested Dictionary structure, that is, store and retrieve Objects of type Dictionary within another Object of type Dictionary?? Also, I would be greatfull if someone could tell me where on MSDN i can find this sort of information. All I am able to find is overly simple examples using primitive data types, what I am looking for is a full API documentation similar to that which Sun provide for the Java programming language. Many thanks in advance! Alan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This appears to work perfectly!
many thanks. A Chip Pearson wrote: The following may get you started. Dim MDict As Dictionary Dim SubDict1 As Dictionary Dim SubDict2 As Dictionary Set MDict = New Scripting.Dictionary Set SubDict1 = New Scripting.Dictionary Set SubDict2 = New Scripting.Dictionary SubDict1.Add Key:="A", Item:=1 SubDict1.Add Key:="B", Item:=2 SubDict2.Add Key:="X", Item:=88 SubDict2.Add Key:="Y", Item:=99 MDict.Add Key:="SubDict1", Item:=SubDict1 MDict.Add Key:="SubDict2", Item:=SubDict2 MDict.Item("SubDict1").Add Key:="Nest1", Item:=3 MDict.Item("SubDict1").Add Key:="Nest2", Item:=4 Debug.Print MDict.Item("SubDict2").Item("X") -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) wrote in message ups.com... Hi, fairly straight forward one here. Can I create a nested Dictionary structure, that is, store and retrieve Objects of type Dictionary within another Object of type Dictionary?? Also, I would be greatfull if someone could tell me where on MSDN i can find this sort of information. All I am able to find is overly simple examples using primitive data types, what I am looking for is a full API documentation similar to that which Sun provide for the Java programming language. Many thanks in advance! Alan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Limitation of collection and dictionary datatype | Excel Programming | |||
determining datatype | Excel Programming | |||
DataType Property | Excel Programming | |||
need help- SUB: DATATYPE FOR A CELL.. | Excel Programming | |||
DataType Conversion | Excel Programming |