2014-11-03 155 views

回答

0

你的意思是加載一個scriptControl對象嗎?

在VBScript:

set x = createobject("msscriptcontrol.scriptcontrol") 
x.language = "vbscript" 
x.executestatement "a = 12" 

在vb6:

Public Sub class_initialize() 
Set Script = CreateObject("ScriptControl") 
Script.Language = "VBScript" 
Script.Reset 
Script.ExecuteStatement "abc = 123" 
End Sub 
+0

對不起,我要聲明類型X. X的變量是一個類上的DLL存在。所以我需要將DLL導入到Script對象中。 – 2016-11-29 07:29:11