Reputation: 1
I am trying to create a macro that will open the file "test.exe" on drive F/. I get "runtime error 5" when running this code below.
Sub MacroTangoMike()
' MacroTangoMike Macro
RetVal = Shell("F:/test.exe", 1)
End Sub
It works fine though if test.exe is on the C/ drive.
Upvotes: 0
Views: 3671
Reputation: 4647
Error 5 is access denied. Are you sure you have the execute permission on the EXE on the F: drive?
Also you should probably be using backslashes \ in your paths on Windows rather than /.
Upvotes: 1