A textual comment to place within the code.
Rem statement or an
apostrophe (') to place remarks within the code.
Apostrophes held within quotation marks aren’t treated as comment markers, as this code snippet shows:
myVar = "'Something'"
In VBA, if you use the
Rem statement (but not the apostrophe)
on the same line as program code, a colon is required after the
program code and before the
Rem statement. For example:
Set objDoc = Server.CreateObject("MyApp.MyObj") : Rem Define the object Rem reference
VBScript, on the other hand, successfully recognizes the
Rem statement even without
In VBA using the VBA editor, if you “comment out” a line, that line and all of its line continuations are affected. In VBScript, the comment keyword or symbol must be added to each line to be “commented out.”