0

I need an object constructor, but I"m cofused with how classes, types, collecitons etc work in VBA The object supposed like this:

obj
    name
        value = ""
        tag = "name"
    id
        value = ""
        tag = "id"
    address
        value = ""
        tag = "address"

    ...

    nthProp
        value = ""
        tag = "nthProp"

Where value is an empty string to populate later and tag is a string that is the same as the property name.

Igor Cheglakov
  • 525
  • 5
  • 11
  • 1
    These two guides will be a great help to you... [Excel Mastery](https://excelmacromastery.com/vba-class-modules/) and [Chip Pearson](http://www.cpearson.com/excel/classes.aspx). – PeterT Oct 15 '19 at 18:10
  • 2
    Classes don't have parameterized constructors in VBA. You can have *factory methods* instead though, and IMO a very clean way to do this is to have a stateless default instance, as shown [here](https://stackoverflow.com/a/46414650/1188513) – Mathieu Guindon Oct 15 '19 at 18:30

0 Answers0