First, click on the line where you want to insert the comment. ![]() Steps you need to follow to add a comment in a VBA code: Debug Your Code: You can use VBA comments to debug the code by converting code lines into comments for testing.Describe a Variable: Variables are one of the most important thing that you need to use while writing a VBA code and you can use a comment to describe a variable.Describe a Function Procedure: When you write a procedure you can add a comment at the starting to describe the purpose of this procedure and how it works.Track the Changes: If some codes need you to change them frequently you can use comments to track or record changes within the code.Helps you to Document your Work: You can use a comment to describe how code works, which can help you in the future to recall it easily or any other user.As I said commenting in a VBA code is one of the best practices and there are a few benefits that come with it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |