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: 367
Default Using vb.net collections in VBA through COMClass

I've been using COMclass objects I create in vb.net (2003) from Excel VBA for
a while now, and I like the abilities it allows. Up until now, I haven't
needed to make a COMclass that includes a collection object (that inherits
from System.Collections.CollectionBase), but I just tried that now. When I
used the collection in VBA, I was surprised to see that it didn't show the
collection's Item() property in the Locals window, even though I declared it
as Public (as the default property). I was able to access items in the
collection in the Immediate window (e.g.: MsgBox collection.Item(1).prop1, or
collection(1).Prop1). However, when I tried to use the For..Each
functionality, I got a message saying the object doesn't support this
property or method. Is there something else I need to do when creating
collections in vb.net to allow them to be used properly in VBA?

Thanks,
Jason
 
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
A List of Collections and Custom Collections ExcelMonkey Excel Programming 1 December 20th 07 10:04 PM
For Each and Collections Memento Excel Programming 6 June 4th 07 02:57 PM
Collections of Collections David Morton Excel Programming 6 November 13th 04 01:10 AM
Help with collections ksnapp[_45_] Excel Programming 1 April 7th 04 12:42 AM
Using Collections Kerry[_4_] Excel Programming 1 January 25th 04 04:08 PM


All times are GMT +1. The time now is 02:58 PM.

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"