LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Iterating over a nested Dictionary object

Hi,

I've setup a nested Dictionary object using classes that initialise
nested dictionary objects. This appears to build ok, however when I
try and iterate over this nested object I get the following debug
message:

"Run-time error '424', Object required"

My code snippet is as follows;

For i = 1 to MDict.Count
For j = 1 to MDict.Items(i).subDict1.Count
For k = 1 to MDict.Items(i).subDict1.Items(j).subDict2.Count
...
Next k
Next j
Next i

The run-time error occurs on the For j = 1... line.

I'm not sure the syntax is correct as this is my first attempt at
using Dictionaries.

I also tried the following with the same result.

For Each md In MDict.items
For Each sd1 In MDict.Item("subDict1").Items
For ach sd2 In MDict.Item("subDict1").Item("subDict2").Items
...
Next
Next
Next

Any help is greatly appreciated.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
iterating through a Dictionary object Ben Excel Programming 4 September 8th 08 06:07 PM
ByRef argument type mismatch when passing dictionary object signon77 Excel Programming 7 January 8th 08 10:03 PM
Using the Dictionary object vqthomf Excel Programming 5 April 10th 07 05:42 PM
Dictionary Object in Windows XP Alan Beban[_2_] Excel Programming 5 March 13th 05 08:04 PM
iterating through all properties of an object Barney Fife Excel Programming 4 August 22nd 03 03:18 AM


All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"