0

I have a query on the MS Script Control, I have an VB6 Program that uses the MSScript control to allow users to write Macros inside the application.

My question is how to import a DLL to object of type MSScriptControl.ScriptControl.

1 Answers1

0

do you mean load a scriptControl object?

in vbscript:

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

in vb6:

Public Sub class_initialize()
Set Script = CreateObject("ScriptControl")
Script.Language = "VBScript"
Script.Reset
Script.ExecuteStatement "abc = 123"
End Sub
Tom
  • 221
  • 1
  • 4
  • 16