Dim o as CObject=createobject ("MSScriptControl.ScriptControl") Dim strProgram As String = "Sub Main" & vbCrLf & "MsgBox 123" & vbCrLf & "End Sub" o.Put("Language" ,"VBScript") o.Run("AddCode" ,strProgram) o.Run("Run","Main")
说明尽在不言中