if str=="text1.enable=flase" then
   text1.enable=flase
end if

解决方案 »

  1.   

    还是得自己写代码:
    如:
    if str="text1.enable=flase"  then text1.enable=flase
    否则好象没办法.
      

  2.   

    我写的text1.enable=false是举个例子,str的内容不定的
      

  3.   

    找是找到了,只是它只能执行VBScript,所以有些功能是受限的..
    MicroSoft Script Control 1.0
      

  4.   

    不可能!
    这不是SQL的脚本
      

  5.   

    以前有人问过
    acptvb(微软全球技术中心 VB技术支持)的回答:
    回复人: acptvb(微软全球技术中心 VB技术支持) (  ) 信誉:99  2002-6-26 16:53:41  得分:0  
     
     
      感谢您使用微软产品。您可以利用Microsoft Script Control来实现这个功能。首先,你需要在工程里引用一下Microsoft Script Control。然后加入一下代码:Private Sub Form_Load()Dim scr As New ScriptControl
    Dim mycode As Stringscr.Language = "vbscript"
    mycode = "public function Test()" + vbCrLf
    mycode = mycode + "MsgBox ""Hello VB""" + vbCrLf
    mycode = mycode + "End function"scr.AddCode (mycode)
    scr.Eval ("Test()")End Sub这样,在字符串mycode里定义的函数Test()就会被调用了。参考:HOWTO: Use Script Control Modules and Procedures Collections 
    http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q184745
    -  微软全球技术中心 VB技术支持本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款
    (http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
    为了为您创建更好的讨论环境,请参加我们的用户满意度调查
    (http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。