Rem Keyword

The apostrophe (') is the preferred comment indicator, although you can use the "Rem" keyword if you want.
This is a rollover from the BASIC days.
Unlike the apostrophe, the Rem keyword can only be written at the start of line and not on the same line (after an instruction).

Rem my comment 

Rem comments cannot appear after statements.
The Rem keyword cannot be immediately followed by any of the following characters ! @ # $ % &
If you really want to include a Rem comment on the same line as another statement you must use the line continuation character (:).

Debug.Print "my message"   'my comment  
Debug.Print "my message" : Rem my comment

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited TopPrevNext