VBA Classes

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 37

  • @SiddharthRout
    @SiddharthRout  2 หลายเดือนก่อน

    Thinking about diving into Object-Oriented Programming (OOP) in a future video! 📚 If you’re interested, drop a comment below and let me know! The more interest we get, the sooner I can make it happen! 👇💬 #OOP #CodingCommunity #LetMeKnow

    • @seyiesan9511
      @seyiesan9511 หลายเดือนก่อน

      I'm profoundly interested in the Object Oreiented Programming - OOP Series.
      Kindly make it happen fast.
      Cheers!!

  • @Robbie1987a
    @Robbie1987a 2 ชั่วโมงที่ผ่านมา

    Thank you so much for this outstanding tutorial! Great job!

  • @TheKulinos
    @TheKulinos หลายเดือนก่อน

    So clear teaching style!

    • @SiddharthRout
      @SiddharthRout  หลายเดือนก่อน

      Thank you so much! I'm glad you found the explanation clear 🙌 Your support means a lot. Stay tuned for more content like this, and feel free to drop any questions or topics you'd like me to cover! 😊

  • @MyFakeBrand
    @MyFakeBrand 6 หลายเดือนก่อน

    Holy moly! I’ve been scripting with VBA for years but struggled with understanding classes. This is the video I needed. This new knowledge will help me right away in a project I am working on. Thank you!

    • @SiddharthRout
      @SiddharthRout  6 หลายเดือนก่อน

      Thank you so much for your kind words! 🌟 I'm thrilled to hear that the video helped you understand VBA classes better. It's amazing to see how learning something new can immediately impact your projects. If you have any more questions or need further clarification as you dive into your current project, feel free to reach out. Keep up the fantastic work, and happy coding!

  • @orange1826
    @orange1826 10 หลายเดือนก่อน

    Great, clear, instructive video on classes using vba. Added it to my references of recommended sample code.

    • @SiddharthRout
      @SiddharthRout  10 หลายเดือนก่อน

      Thanks for taking the time out to appreciate it.

  • @JiriMerkl
    @JiriMerkl 11 หลายเดือนก่อน +1

    Thanks for the explanation mr. Sidd. OOP is great if you want to be a good developer (i think). I've read a lot of concepts from internet, but there are misunderstanding data. This way is great. 🤗🤗

    • @SiddharthRout
      @SiddharthRout  11 หลายเดือนก่อน

      Thanks Jiri for taking the time out to appreciate it 😊

  • @ВиленДаутов
    @ВиленДаутов ปีที่แล้ว

    Хоть и не на русском но я все равно понял основу принципа работы. Самый хороший обзор. Большое спасибо брат! Успехов твоему каналу. 🤝

    • @SiddharthRout
      @SiddharthRout  ปีที่แล้ว

      Рад помочь. Если у вас есть вопросы, вы можете задать их на русском языке, и я постараюсь вам ответить :)

  • @R72Investments
    @R72Investments 10 หลายเดือนก่อน

    Hi Siddharth, this is my first time on your channel and I hit the subscribe button after only two minutes. Your easy to understand explanation at the beginning of the video has already convinced me. Well done! Keep up the good work!

    • @SiddharthRout
      @SiddharthRout  10 หลายเดือนก่อน

      Thanks for taking the time out to appreciate it.

  • @DanijelBlasko
    @DanijelBlasko 8 หลายเดือนก่อน +1

    Amazing job!

    • @SiddharthRout
      @SiddharthRout  7 หลายเดือนก่อน

      Thanks for taking the time out to appreciate it. Strange, I did not get an alert for your comment.

  • @kevinmccurley7597
    @kevinmccurley7597 2 ปีที่แล้ว

    Excellent video Sid - very instructive!

    • @SiddharthRout
      @SiddharthRout  2 ปีที่แล้ว

      Glad you like it. And thank you for taking the time out to appreciate it. :)

  • @ramandeepsr
    @ramandeepsr 2 ปีที่แล้ว

    Loved the way you explained. Thank you!! 😄
    Keep it up!

    • @SiddharthRout
      @SiddharthRout  2 ปีที่แล้ว

      Glad you liked it Ramandeep :)

  • @MyPhotographic
    @MyPhotographic 7 หลายเดือนก่อน

    EXCELLENT Tutorial!!!!!!...... using real world example makes it so much easier to understand! - a couple of small requests/suggestions. Could you step through the code and explain as the program runs - it helps to understand the process flow. As you advance set breakpoints so there is not a lot of repetition. A second request/suggestion is to show how to crerate a user interface - perhaps as a follow up video? - A REALLY great job!!!...

    • @SiddharthRout
      @SiddharthRout  7 หลายเดือนก่อน

      Thanks for the suggestions. Will try and incorporate them in my next video :)

  • @noviceprogrammer2011
    @noviceprogrammer2011 2 ปีที่แล้ว +1

    Why do you use composition?
    You could have declared a variable in the standard module, such as Dim MyVariable As Gear.
    Then in Sub DriveCar, you can replace .TheGear.GearUp with MyVariable.GearUp.
    Similarly for .TheGear.GearDown with MyVariable.GearDown.
    How does using TheCar.TheGear.GearUp help? I think it confuses people (certianly me)!
    Thanks

    • @SiddharthRout
      @SiddharthRout  2 ปีที่แล้ว +1

      Very good question! I used composition so that the relationship can be maintained. This way if the parent object is deleted, then the child object also loses its status. For example, if the car is destroyed then the Gear is also destroyed. If I keep it in a module separately then there is no relationship. Even when the car object is destroyed, the gear object will still be available. You don't want the gear to be dangling around after the car is destroyed. 😊

    • @noviceprogrammer2011
      @noviceprogrammer2011 2 หลายเดือนก่อน +1

      @@SiddharthRout Thanks for the explanation.

  • @xxroco0418xx
    @xxroco0418xx 19 วันที่ผ่านมา +1

    Can you upload again the file ? it was deleted

  • @KrazyMO
    @KrazyMO ปีที่แล้ว +1

    I created classes just so I can move multiple variables via a dictionary. Should I instead move the code that uses the variables into the class methods and just instantiate the class every time I need to manipulate data associated with the class?

    • @SiddharthRout
      @SiddharthRout  ปีที่แล้ว

      While I can't comment without looking at your code, it is a good idea in general to move variables inside classes and expose them via properties. This is in accordance with OOP concept and is called "encapsulation". It makes for better code overall.

  • @noviceprogrammer2011
    @noviceprogrammer2011 2 หลายเดือนก่อน

    Hi,
    I'm been waiting for your "next video" on OOP.
    Do you plan to release it anytime soon?

    • @SiddharthRout
      @SiddharthRout  2 หลายเดือนก่อน

      Hi! I’d love to dive into OOP, but I’ve been waiting for a stronger response from viewers to make sure it’s something people want. You and just a couple others have shown interest so far. If more viewers want to see it, I’d be thrilled to create this content!

    • @noviceprogrammer2011
      @noviceprogrammer2011 หลายเดือนก่อน

      @@SiddharthRout The problem is not many VBA developers would be aware that it's possible to create VBA programs in an OO way.
      I bet 99% of VBA developers have never heard of design patterns or SOLID principles, so obviously they won't be requesting it.
      However, once you've introduced it, I'm sure you'll open up more interest.

  • @KuldeepSingh-nq1vi
    @KuldeepSingh-nq1vi ปีที่แล้ว

    I couldn't understand how event Works in class Module, you should have created this video in multiple parts in details by telling each and every concepts line by line.. 😂
    I want to learn WithEvent and Raise Event concept in details, so make a Video on these topics as well.

  • @noviceprogrammer2011
    @noviceprogrammer2011 2 ปีที่แล้ว +1

    The code in the downloaded workbook is different to the video.
    Sub MyCarExperience()
    CreateNewCar
    FillFuel
    DriveTheCar

    Dim CarTyreState As Double
    CarTyreState = TheCar.TheTyre.TyreCondition

    If CarTyreState < 40 Then
    MsgBox "Car Tyre Condition: " & CarTyreState & "." _
    & vbNewLine & "We will replace tyres now"
    Set TheCar.TheTyre = New Tyre

    MsgBox "Car tyres have been replaced."
    MsgBox "Car Tyre Condition: " & CarTyreState & "."
    End If

    Set TheCar = Nothing
    End Sub
    This line is wrong in the download:
    MsgBox "Car Tyre Condition: " & CarTyreState & "."
    but it's correct in the video.

    • @SiddharthRout
      @SiddharthRout  2 ปีที่แล้ว +1

      Thank you for bringing it to my notice. Will check and rectify it within 24 hours :)

    • @SiddharthRout
      @SiddharthRout  2 ปีที่แล้ว

      Fixed! Thanks again.