Getters and Setters in VBA

Поделиться
HTML-код
  • Опубликовано: 11 авг 2022
  • In this video, we look at how getters and setters work in VBA.
    In order to understand how getters and setters work, we'll step through the ones we added to the cat class we created in my "Creating Classes in VBA" video ( • Creating Classes in VBA ).
    _____________________________________________________________________________________
    If you appreciate my content, please support this channel by donating on my website: sayrhymes.com/donate/
    #JenniferGarthVBA #vbatutorial
  • НаукаНаука

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

  • @weibinren92
    @weibinren92 Год назад +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  Год назад +3

      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

    This is gold. Thank you!

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

    Good clear explanation. Thank you.

  • @Maxseven777
    @Maxseven777 Год назад +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 7 месяцев назад

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