Excel VBA || Calling Subs and Functions || Parent - Child Architecture || Make your code smarter
HTML-код
- Опубликовано: 22 июл 2024
- Learn HOW to Call Subs and Functions from your Current Sub. We will cover the Parent Sub - Child Sub Architecture that will guide you to organize your code and build scalable projects.
Most of you might be used to working with Single Sub VBA macros, where the end-to-end flow is bundled into a Single Macro. In this video, we will learn how to distribute our code to different (child) subs and functions.
We will first, deep dive into the theory of Sub-Procedures and Functions. Then, we will do a Practice Session where we covert (Refactor) a Large, Single Macro into Multiple Bite Sized Subs and Functions. And last, but not least, we will look at how to tackle error handling in a Multi-Sub Project.
Code can be downloaded from:
skillsandautomation.com/tutor...
Macro files can be downloaded from:
github.com/skillsandautomatio...
00:00 Intro
01:29 Benefits
04:31 Parent - Child Subs
06:43 Theory
16:27 Example - Walk Thru
20:52 Practice Session
43:49 Error Handling - Single Subs
48:33 Error Handling - Multi Subs Наука
great effort to teach us.thank you
Nice Explained.
Amazing video Sir, you explained everything in this video with deep clarity. Understood each and everything. But sir On Error Resume Next and On Error GoTo 0 both are not cleared to me. Please make video only on these two errors sir.
Hi, On Error Resume Next - Skips to the next line of code when an error occurs, while On Error GoTo 0 - Resets the Error Handler. Normally, you would use Resume Next, before the Line/ Lines you want to skip/ignore and GoTo 0 after the point from where you can want to resume normal error handling.
As for a separate video, unfortunately, I won't have the bandwidth for it right now. Next, i am making a detailed vba master class series (beginner to pro) starting from mid - April onwards on RUclips. Error Handling will be covered in that, so don't want to release anything else before.
@@SkillsandAutomation thank you sir, I will be waiting for your series
Hello Sir, Have you posted any real world project 's video on Excel VBA class module?
Hello Sir, Have you posted any video on real scenerio project of excel VBA class modules?
Hi, Sorry. Not yet.
@@SkillsandAutomation Sir I am requesting you to make video on excel vba class module real world projects if possible. It will really helpful for us.