VBA: How to run another application from MS Access

后端 未结 4 1372
南方客
南方客 2021-01-11 13:46

I\'ve been trying to get this issue figured out, and it seems that I cannot find the solution to the problem anywhere. Here was the first part: VBA Shell command always retu

4条回答
  •  天涯浪人
    2021-01-11 14:15

    Just messing about with http://www.mombu.com/microsoft/scripting-wsh/t-vista-uac-problem-with-wscriptshell-run-method-1508617.html. I tried this on Windows 7 home PC.

    Set objShell = CreateObject("Shell.Application")
    myPath = Environ("ProgramFiles(x86)") & "\mytool"
    Set objFolder = objShell.Namespace(myPath)
    Set objFolderItem = objFolder.ParseName("mytool.exe")
    objFolderItem.InvokeVerb "runas"
    

    It might give you some ideas.

提交回复
热议问题