为什么下面这句代码粘贴到代码窗口编译可以正确执行,而用ScriptControl控件执行却提示:
C:\.........\1.chm 不是 Windows 帮助文件,或者该文件已被破坏。x = MsgBox ("内容",16384,"标题","1.chm","100")
C:\.........\1.chm 不是 Windows 帮助文件,或者该文件已被破坏。x = MsgBox ("内容",16384,"标题","1.chm","100")
Option Explicit
Private Sub Command1_Click()
ScriptControl1.Language = "VBScript"
ScriptControl1.AddCode (Text1.Text)
ScriptControl1.Run ("Test")
End Sub
将下列代码拷到Text1,单击Command1
sub Test()
x = MsgBox ("内容",16384,"标题","1.chm","100")
end sub