Dim Oshell
Set  Oshell=CreateObject("WSCript.shell")
Oshell.run "notep"
Set Oshell=nothing
提示库中没有注册。。不知道咋回事?
大家忙忙看看是什么原因

解决方案 »

  1.   


        Dim Oshell As Object
        Set Oshell = CreateObject("WSCript.shell")
        Oshell.run "notepad"
        Set Oshell = Nothing
      

  2.   

    呵呵,我看了几遍都没有发现这个noepad。还是你眼睛厉害啊。
      

  3.   

    如果 WSCript.shell 对象不能使用,有以下几个可能:
    1、系统不全,缺失组件
    2、组件权限受限,你的程序没有权限创建组件
    3、组件文件存在,但被注销在 VB 里,可以使用 Shell 实现,不用这么麻烦,如:
    Shell "notepad",5或用API ShellExecute 来实现,如:
    ShellExecute 0,"open","notepad","","",5