VBA: Why Use Properties Instead of Subroutines or Functions?

前端 未结 4 538
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-19 11:04

Why do we need to use property Let, Get and Set in a VBA class when we can simply pass and return our arguments using subroutines or f

4条回答
  •  醉酒成梦
    2021-01-19 11:31

    Moreover, Let/Get combination or Set/Get combination sets a discipline for type of argument (for Let/Set) and return value (Get) so that functions can be used on left hand side of an assignment statement. Makes coding crisp!

提交回复
热议问题