Getters and Setters in VBA

Поделиться
HTML-код
  • Опубликовано: 27 дек 2024

Комментарии • 6

  • @weibinren92
    @weibinren92 2 года назад +1

    Hi, at 8:56, the content of the rngCatName Setter shouldn't be "Set prngCatName = rngCatNameArg"?
    And the content of the Getter should be "Set rngCatName = prngCatName"

    • @Jennifer_Garth
      @Jennifer_Garth  2 года назад +4

      Yes, you are correct! Thank you for pointing this out. At 9:51, the code is corrected, which is why it worked when I ran the code.
      When I was editing the video, I must not have noticed that that code is wrong and then corrected with no explanation.
      I will see if there is any way for me to edit the video on RUclips to add a note about the error. I will also create a new video discussing this issue and use it as an opportunity to discuss getters and setters a little more and talk a little bit about debugging. But for now, I'll just pin your comment.

  • @jmathew6988
    @jmathew6988 2 года назад +2

    This is gold. Thank you!

  • @philhamilton6926
    @philhamilton6926 2 года назад

    Good clear explanation. Thank you.

  • @Maxseven777
    @Maxseven777 2 года назад +4

    I think the three properties should be changed by Microsoft to Get, SetObj, SetVal, instead of Get, Set and Let. I find the "Let" term to be confusing. Just saying 😁

  • @fahadshaheen2373
    @fahadshaheen2373 Год назад

    sorry Jennifer , but the explanation is really confusing especially with this unnoticed mistake you have made .