0

由于 Windows 10 Enterprise 的更新,我们的 MS Access VBA 脚本不再工作。使用 Windwows 8.1 一切正常。

Private Sub click_Click()
 Dim shell As Object
 Set shell = VBA.CreateObject("WScript.Shell")
 Dim waitTillComplete As Boolean: waitTillComplete = True
 Dim Style As Integer: Style = 2
 Dim errorCode As Long

 temp = "cmd.exe /k cd.."
 
 errorCode = shell.Run(temp, Style, waitTillComplete)
 
End Sub

错误发生在执行 .Run 并返回

“运行时错误'70':权限被拒绝”。

有什么想法可以解决或解决这个问题吗?

4

0 回答 0