Rem, //, '
This item was deprecated in version 2019r2. Please use Commenting (// or ')]] as a replacement.
Used to add comments to your code.
Rem the comment (this syntax is deprecated)
// the comment
' the comment
The text of the comment.
The compiler ignores any comments you enter using the Rem statement, the //, or the ' . Comments are not included in the built app.
Comments can appear on separate lines or on the same line as executable code, provided they are to the right of any code that will execute. Valid comments appear in the Code Editor in red by default. You can change the color of comments in Options/Preferences.
The Ctrl+' keyboard shortcut (Command-' on Mac) toggles the selected lines of code between commented out and "live" states. The Comment and Uncomment buttons in the Code Editor toolbar do the same thing.
The following code uses comments to document the results of Boolean comparisons:
Rem This is a comment // This is a comment ' This is a comment Dim tax1 As Double // contains the tax rate Dim tax2 As Double ' contains the tax rate Dim tax2 As Double Rem contains the tax rate
All project types on all supported operating systems.