Visual Basic for Applications Reference

Rem Statement Example

This example illustrates the various forms of the Rem statement, which is used to include explanatory remarks in a program.

  Dim MyStr1, MyStr2
MyStr1 = "Hello": Rem Comment after a statement separated by a colon.
MyStr2 = "Goodbye"    ' This is also a comment; no colon is needed.