现在用的笨方法,Split and Array只针对简单的不规则的字符串,如果需求要变复杂怎么办????怎么可以把字符串的内容简单地转换为可执行的代码呢??呢呢呢??
2011-05-15 原来真的是可以的,呵呵
Dim strProgram As String
Dim intData AsInteger
Dim sc As Object
sc = CreateObject("ScriptControl")
sc.language = "VBScript"
intData = 1
strProgram = "If " & intData & " + 1 = 2 Then"& vbCrLf & _
"MsgBox ""True""" & vbCrLf & _
"End If"
sc.addcode(strProgram)