Programming with Reflection

image\rwnprg32.gif CompileScript method

 

Syntax ErrorCode = object.CompileScript(ScriptName)

 

Description

Compiles a Reflection Basic script.

Arguments

ScriptName Argument type: String
Required
Specifies a Reflection Basic script to compile. Supply complete path information if the script isn't on the Reflection macro path. If ScriptName specifies a plain text file, the file is automatically converted to the Reflection Basic script format.

Return

ErrorCode Return type: Integer
The numeric error code from the compilation: 0 if the script was successfully compiled (contained no syntax errors), or a non-zero error value. Use the Error$ statement to return the equivalent error message:

Example

Sub Demo ()

 Dim x As Long

 x = Session.CompileScript("C:\onions.rbs")

 MsgBox "Error #" & x & ", " & Error$(x)

End Sub

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command