4楼代码我测试没有问题,如果不理解,就看看调试结果
Dim s1 As String = FileSys.ReadAllText(ProjectPath & "s1.txt", Encoding.Default)
msgbox(s1)
Dim s2 As String = FileSys.ReadAllText(ProjectPath & "s2.txt", Encoding.Default)
msgbox(s2)
Dim s As String = s2.Replace("Eval(s)","Eval(""" & s1 & """)") ‘s2代码里面的s要替换为s1的内容
msgbox(s) ‘看替换后的结果
If s > ""
Functions.Add("test",s)
Functions.Complie()
Functions.Execute("test")
Functions.Remove("test")
End If
认真理解一下帮助: