Posted on

In this video, we will see how we can add a comment in a VBA code. Apart from writing code, it’s important to add comments to describe what that code does.

The First way to add a comment is to simply type an APOSTROPHE (‘) before the comment line.

Apart from this, there is a button called “Comment Block” which you can use. You just need to select the line of the codetext to convert it into a comment. This button simply adds an APOSTROPHE (‘) which otherwise you need to type.

Just like the comment button, there’s also a UN-COMMENT button to which you can use to remove the APOSTROPHE (‘) from the comment.

The third method is not quite popular but still worth to learn. In this method, you simply need to add the keyword REM before the comment line.

Want to Learn VBA? Check out this STEP by STEP Guide:



Xem thêm bài viết khác:

3 Replies to “How to a Add Comment in a VBA Code | 3 Simple Ways”

Leave a Reply

Your email address will not be published. Required fields are marked *