Convert Existing VBA Code into a Class

Поделиться
HTML-код
  • Опубликовано: 30 окт 2022
  • In this video we will walk through converting existing VBA code into a class module. Topics of discussion include:
    - Class modules
    - Passing arguments vs. using class properties
    - Scope
    - Visibility of properties and methods outside of the class
    The code used in this video can be found here: • Custom Enumerations: ...
    An introduction to class modules can be found here: • Creating Classes in VBA
    _____________________________________________________________________________________
    If you appreciate my content, please support this channel by donating on my website: sayrhymes.com/donate/
    #JenniferGarthVBA #vbatutorial
  • НаукаНаука

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

  • @jdub-replicant
    @jdub-replicant 3 месяца назад

    thank you for explaining the get and let assignments when stepping through the code. I have read so many articles and books and I just didn't that concept that till you showed it step by step. soooooo helpful thank you!!!! i probably could have figured that out but there is so much i'm trying to figure out. your vids are incredibly helpful!!!

  • @RungeCarl
    @RungeCarl Год назад +1

    Another brilliant module! One of the best explanations of regular modules vs classes I have seen

  • @AbdulRahmanSABRA
    @AbdulRahmanSABRA Год назад +2

    Great Tutorial looking for more , thanks Jennifer

  • @simondechoisy779
    @simondechoisy779 5 месяцев назад

    Jennifer - I have stumbled my way through class modules with a modicum of success but have never been quite sure. This is simply the best explanation! This has helped me fully bridge the gap in my knowledge from being a good coder in modules to being able to code class modules with confidence.
    I want to say a big thank you and, for anyone wanting to learn about classes, I will be sending them to your you tube videos.

  • @charlieprocaccini2125
    @charlieprocaccini2125 Год назад +2

    Nice tutorial, look forward to more on classes

  • @jmathew6988
    @jmathew6988 Год назад +1

    This is another great tutorial giving in-depth understanding into the working of VBA Classes.
    I was stuck with a VBA assignment where columns become reordered or new columns get added (headers unchanged) thereby making hard-coded cell referencing out of question. After watching this tutorial I may have hit upon a potential fix. Shall be working on it in the coming days.
    Thank you for your effort to explain the VBA classes working with such detail.

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

    It was helpful seeing how to CONVERT to a class module, very good example

  • @noviceprogrammer2011
    @noviceprogrammer2011 Год назад +1

    Great video, well explained.

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

    Great video, thanks Jennifer!

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

    Great job Jennifer!

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

    @Jennifer Garth I appreciate the elegance of your code and the straightforward presentation. Please expand Class concepts to their fullest. I am looking forward to your discussion of *Implements*.
    Thank you.

    • @mjohnstone2399
      @mjohnstone2399 5 месяцев назад +1

      Rubberduck has good VBA OOP blogs and examples.

  • @George-lp3qb
    @George-lp3qb Год назад

    Very helpful

  • @user-yk2sg5pd5g
    @user-yk2sg5pd5g 9 месяцев назад

    Hi Jenifer, thank you for the video. Though you're a newby in VBA youtuber it was what I have thought others should create to convince learners of classmodue. I guess I will subscribe you and share some ideas regarding VBA.

  • @ousmanetall1286
    @ousmanetall1286 8 месяцев назад

    Great video, but you could ommit using the gets property, since you haven't need then in this project, or if you really want to use them, instead of calling the pFirstName, pLastName etc, you have to call the function get FirstName, get LastName etc rather, to run them in other hand

  • @AnilKumar-vi8oe
    @AnilKumar-vi8oe Год назад

    Keep going and upload videos frequently

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

    Great

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

    So to create a satellite that orbit around earth then some properties would be size of antenna and power that can be battery or solar and antenna receiver and antenna transmitter would be methods and how do I create functions when antennas send messages to and from earth ? Thanks in advanace. Also a satellite does not have light but reflects light from sun, satellite changes its phases,and satellite revolves around a planet instead of the sun.

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

    It would be great if you could cover working with customxml part like crus operations in vba 😊

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

    hai jenni your voice is fabulous i think your voice we heard like a dance competition the mayyas

  • @danp6101
    @danp6101 9 месяцев назад

    Why didn't you use a Private variable for the class for the select case peEmploymentType.
    where the variable would have been set going through the select case. IE empolyeeType = FullTime.
    Then just have 1 sub PrintForms that would be called after the select case.
    Private Sub PrintForms
    Debug.Print pFirstName, pLastName, employeeType
    end sub

  • @peterwooldridge7285
    @peterwooldridge7285 Год назад +1

    Hi Jennifer, some very useful info on your channel . Unfortunately, like almost all channels of this ilk it lacks cohesiveness and only tells half the storey.
    What is really needed is a series of tutorials which demonstrates the various elements you've described (classes, modules, enums etc) as they would be usedare in a "real life" application that uses Userforms (at least 2), interaction between forms, pushing and pulling data to worksheets, incorporates validation etc etc...
    I think such a series would put you ahead of the game
    What do you think?

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

    Great tutorial, but it lacks a bit of simple vba code. I almost see a class

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

    Quick question: you showed HOW to convert from a regular module to a class module. However, you did not explain WHY you converted it.
    Can you drop a comment here explaining the purpose.
    Thanks

  • @baphnie
    @baphnie Месяц назад

    Fear of globals feels like superstition.