‘ Remark - VBScript


The Remark command outputs comments and instructions in the VBScript code. Comments are non-executable lines that provide documentation and notes, enhancing code readability and debugging. Remarks are essential for effective code organization.


Remark <comment text>
  • <comment text>: The comment or note to be added. It can contain any text, including special characters and line breaks.


' Simple remark
Remark This line outputs a comment

' Multiline remark
This is a multiline remark
It spans multiple lines for clarity
' Commenting out code
Dim myVariable = 10
' Remark the following line to disable it
myVariable = 15


Remark integrates well with other VBScript commands and structures, such as:

  • If-Then-Else: Use remarks to explain conditional statements and clarify branching logic.
  • Loops: Remark the start and end of loops to indicate their purpose and scope.
  • Subroutines: Add remarks to document the purpose, parameters, and usage of subroutines.
  • Option Explicit: Forces explicit variable declaration, which can be complimented by remarks to improve code readability.
  • Debug.Print: Prints debug messages, which can be combined with remarks for troubleshooting.
  • WScript.StdOut.WriteLine: Writes output to the console, allowing remarks to be included in command-line scripts.