Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Collection Class (VBA)

    I'm making a collection class in VBA (for Excel, but for this post, I'd like to keep it generic), using Microsoft's Creating Your Own Collection Class as an example. I would like to make Item the default property, and I would also like to enable ForEach loops like the example did, but their information is for VB not VBA. I remember seeing how to do the default property (I think it involves exporting the class, editing it & importingit back in), but I cannot find it; and I've never seen anything about the ForEach. Does anyone know how to do either of these two? TIA --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Collection Class (VBA)

    Never mind, I should have looked harder:
    1) See Chip Pearson Default Property Of A Class
    2) See Wrox Forum's Thread on NewEnum
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Collection Class (VBA)

    Just for completness, in case someone wants an example, the code and workbook that use these two items are in <post:=537,542>post 537,542</post:>
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •