0

Due to Updates to Windows 10 Enterprise our MS Access VBA script isn't working anymore. Everything was fine using 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

The error occurs executing the .Run and returns

"Run-time error '70': Permission denied".

Any ideas to fix or work around the problem?

Filburt
  • 17,626
  • 12
  • 64
  • 115
basidio
  • 15
  • 4
  • 1
    First stop to investigate would be to check the Application Eventlog for more error details. – Filburt Jan 13 '22 at 13:05
  • Hi, I can't find anything problem related in the log, but maybe I'm not looking at the correct place. "Windows Logs"-"Application", correct?. I have tried to sort by time and filter by VSTO 4.0 and Office. – basidio Jan 13 '22 at 13:37
  • Yes, Application is the right spot but I'd leave out any filters and try to narrow down by time - since you can reproduce the error, it shouldn't be too hard to spot it in a range of some minutes. – Filburt Jan 13 '22 at 14:21
  • The missing Log is part of the solution. Our IT informed me, that there is no log, because the excecution is blocked by our security system. There seems to be ne solution for my problem except using Windows 8.1. Thanks anyways. – basidio Jan 13 '22 at 14:32

0 Answers0