I have used the Shell command in MS Access for several years in multiple databases in various versions. Most recently, I have received this Run-Time error 5 - invalid procedure call or argument on a Shell command I have used for many years. Can anyone tell me if there was a recent Windows update or possibly MS Office update that has caused this error to appear? I am currently using Office 2010 and Office 2013 and receiving the same error in both version on multiple computers. I have even tried creating a simple empty database and gone straight to the vba window and in the immediate window tried a simple Shell command as such:
Shell "C:\Notepad.bat", vbNormalFocus
Notepad.bat is a simple command inside it:
cmd /C "Notepad.exe"
The code:
Shell "Notepad.exe", vbNormalFocus
does work, but:
Shell "Cmd.exe", vbNormalFocus
still gives the same Error 5 message on every machine I test it on. Running the batch files from the Windows explorer works just fine. Any help is much appreciated.