Serving the Quantitative Finance Community

 
User avatar
street
Topic Author
Posts: 0
Joined: March 27th, 2008, 1:51 am

Dictionary Object in VBA

August 20th, 2009, 2:42 pm

Does anyone have any experience with the Dictionary Object.It requires the sccrun.dll which I grabbed from sys32 folder. Now I am receiving a Automation Error - Library Not Registered bullshit.It seems to be working as I can Say something likeDim dict as DICTIONARY and it autocompletes the Dictionary portion.However, Set dict as New Dictionary utterly fails.Is there a way to force the mf'er to register.
 
User avatar
zhouxing
Posts: 1
Joined: March 24th, 2006, 4:17 pm

Dictionary Object in VBA

August 20th, 2009, 2:47 pm

VBA allows you to use almost all the .NET libraries. So you can reference the System and use .NET Dictionary object. It is for sure ready to use and the interface is what you will expect (actually inside your VBA code, you cannot really tell it is a .NET class :->)
 
User avatar
street
Topic Author
Posts: 0
Joined: March 27th, 2008, 1:51 am

Dictionary Object in VBA

August 20th, 2009, 4:27 pm

My solution was to re-register scrrun.dll using rgsrvr.Some one might have a better way than a dictionary to do what I am doing which is aggregating cash-flows with the coupon dates as the keys.I am pulling in some MGTS from BB via:BLDP( cusip + MGT, MGT_CASH_FLOW). Then once I have those I iterate over the returned multi-dimensional matrix and collect up coupons based on the dates.