In this lesson, I learned the difference between Event procedures, Sub procedures, and Functions in VBA, and how each one is called or triggered in Excel.
I learned that Events run automatically when something happens in Excel, such as changing a cell. Subs perform actions and must be called manually, either from another Sub, an Event, or a button. Functions return values and can be used both in VBA code and directly in Excel cells like formulas.
Application in Inventory Management
This knowledge is very useful in inventory management. Events can automatically respond when stock quantities change, Subs can handle tasks like updating records or generating alerts, and Functions can calculate stock values, reorder levels, or balances. Using these together can help automate inventory processes, reduce manual work, and improve accuracy.
Overall, this lesson helped me understand how VBA logic flows and how it can be applied to real-world inventory systems in Excel.