我试了一下是有这个问题,怎么解决呢!就用相对路径啦,即app.path

解决方案 »

  1.   

    shell "C:\Program Files\betaV0.1\current.xls"就可以了
      

  2.   

    Shell的参数是字符串,你看你写了什么:)shell "D:\Program Files\Microsoft Office\Office\EXCEL.EXE C:\Program Files\be
    taV0.1\current.xls"这样是不是就可以了:)
      

  3.   

    Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongDim Str As String
    Str = "D:\Program Files\Microsoft Office\Office\EXCEL.EXE C:\Program Files\betaV0 0.1\current.xls"
    ShellExecute 0&, vbnullstrin, Str, vbNullString, Left(Str, InStrRev(Str, "\") - 1), 1如果你要用SHELL的话,就要把路径转为DOS的8位路径了!用FSO可以轻松转换!!
      

  4.   

    Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongDim Str As String
    Str = "D:\Program Files\Microsoft Office\Office\EXCEL.EXE C:\Program Files\betaV0 0.1\current.xls"
    ShellExecute 0&, vbnullstring, Str, vbNullString, Left(Str, InStrRev(Str, "\") - 1), 1如果你要用SHELL的话,就要把路径转为DOS的8位路径了!用FSO可以轻松转换!!