VBA Comment Structure

This section of the VBA learning course reviews the Comment Structure. In every programming language, you need to have the ability to write comments within your code. Adding comments is a useful way to remember logic, versions, or even ideas.

In VBA, comments can be added using two methods:

  • Single Quote (‘)
  • REM Keyword

Single Quote (‘) Comment Method

By adding a single quote (‘) at the start of a line, the entire statement is treated as a comment.

Single Quote Comment in VBA
Single Quote comment in VBA

REM Keyword Method

Any line that starts with REM will be treated as a comment.

REM Keyword Method
REM Keyword Method for comments

Leave a Reply

Pivot Tables

Overview: Pivot tables are one of the most versatile and powerful tools available in Excel. They allow you to display

Read More »
Scroll to Top