1) I am writing some VBScript (not VBA) code that creates and manipulates an Excel Workbook.
2) All works well except that some Excel methods use a character sequence of colon folowed by equals ":=" to distinguish options, for example-
With objExcel.ActiveSheet
.Move after:=Worksheets(objExcel.Worksheets.Count)
.Name = newSheetName
End With
or
objExcel.Active.Workbook.Names.Add Name:="Finance"
3) These ":=" methods do not work because VBScript alwasy treats the COLON as a LINE SEPARATOR and so the syntax is considered incorrect and the code fails.
4) Is there any way that the Colon can be escaped so that it does not mean line separator or can anyone think of another way to achieve the ":=" that the Excel method(s) need
Rgds - M
2) All works well except that some Excel methods use a character sequence of colon folowed by equals ":=" to distinguish options, for example-
With objExcel.ActiveSheet
.Move after:=Worksheets(objExcel.Worksheets.Count)
.Name = newSheetName
End With
or
objExcel.Active.Workbook.Names.Add Name:="Finance"
3) These ":=" methods do not work because VBScript alwasy treats the COLON as a LINE SEPARATOR and so the syntax is considered incorrect and the code fails.
4) Is there any way that the Colon can be escaped so that it does not mean line separator or can anyone think of another way to achieve the ":=" that the Excel method(s) need
Rgds - M