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

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…

Contents