If you have the problem that you have really long lines in your VBScript that contain only one command, but need to be broken to be able to overview it, you can use the Underscore (_) operator. Placing a space character followed by an underscore at the end of the line will make Windows treat the next line as if it was part of the previous line.
However this does not work as easy for quoted expressions. In this case you have to close the quote, place the underscore and concatenate the next line to the previous one with an ampersand (&) like this (it does not make any sense to break the line here, it is only for demonstration):

Set objFSO = CreateObject("Scripting.File" _
& "SystemObject")

Break Lines in VBScript (Windows)
Tagged on:                         

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Ad #native_company# — #native_desc# #native_cta#