Used to include explanatory remarks in a program.
REM comment
-or-
' comment
You can put a REM statement alone on a line, or you can put it on a line following another statement. The REM statement must be the last statement on the line. If it follows another statement, the REM must be separated from that statement by a space.
You can use a single quote (') instead of REM. This is true whether your comment follows another statement on the same line or sits alone on a line.
This example illustrates the REM statement, which is used to include explanatory remarks in a program. It also shows the alternative of using the single quote character (') instead of REM.
Dim MyStr1, MyStr2 as String MyStr1 = "Hello"REM
Comment after a statement using REM. MyStr2 = "Goodbye" ' Comment after a statement using the ' character.REM
This entire line is a comment. ' This entire line is also a comment.