From the course: Excel: Learning VBA
Unlock the full course today
Join today to access over 24,300 courses taught by industry experts.
Add comments to your code - Microsoft Excel Tutorial
From the course: Excel: Learning VBA
Add comments to your code
- [Instructor] Even the best VBA programmers need time to examine an unfamiliar workbook's code to learn how it operates. Whether you're viewing a new workbook or one that you created some time ago, you'll find that adding comments to the code helps you understand its operation much more quickly. In this movie, I will show you several ways to use comments to make your programming job easier. My sample file is 01_08_Comments and you can find it in the chapter one folder of the Exercise Files collection. In this workbook, I have a worksheet named sales tax and a value in C7 that we will use in our routines. I'll press Alt F11 to move to the visual based editor and I'll start by looking at this function in the sales tax module. It is a function that takes in a value and then multiplies it by 1.09. So in other words, it's 100% of the original value plus another 9%, and the 9% is sales tax. However, if you're not used to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
Introduce object-oriented programming3m 2s
-
(Locked)
Examine the Excel object model4m 14s
-
(Locked)
Work in the Visual Basic Editor6m 27s
-
(Locked)
Set VBA project properties4m 28s
-
(Locked)
Create, export, and delete code modules5m 54s
-
(Locked)
Create a subroutine3m 28s
-
Create a function5m 2s
-
(Locked)
Add comments to your code4m 47s
-
Run a VBA procedure5m 20s
-
(Locked)
Add code to a recorded macro3m 48s
-
(Locked)
-
-
-
-
-
-
-