When to use a Class in VBA?

后端 未结 12 1195
情歌与酒
情歌与酒 2020-12-02 07:04

When is it appropriate to use a class in Visual Basic for Applications (VBA)?

I\'m assuming the accelerated development and reduction of introducing bugs is a common

12条回答
  •  生来不讨喜
    2020-12-02 07:56

    For data recursion (a.k.a. BOM handling), a custom class is critically helpful and I think sometimes indispensable. You can make a recursive function without a class module, but a lot of data issues can't be addressed effectively.

    (I don't know why people aren't out peddling BOM library-sets for VBA. Maybe the XML tools have made a difference.)

    Multiple form instances is the common application of a class (many automation problems are otherwise unsolvable), I assume the question is about custom classes.

提交回复
热议问题