Permission Denied Error 70 when running shell to run VBS script

  1. wotadude
    wotadude
    I am trying to run a VBS script file, and get Run-Time error '70' Permission denied.

    This has been very successful in the past (for the same code, and many other) so I do not see it as a vbs code issue.
    The vbs file is located on an accessible location.
    But cannot determine the cause or solution.

    I have simplified the VBS file code to a simple instruction (Msgbox "test")
    I can manually double-click the file to execute the vbscript, this works successfully (for coded purpose and simple test)

    Below is the vba code to run the vbs file.

    Sub testVBS()
    Dim s As String
    Dim wshShell As Object

    ' Run Visual Basic Script file
    Set wshShell = CreateObject("Wscript.Shell")
    s = wshShell.Run("""" & "C:\Users\XYZme\Desktop\testmsgbox.vbs" & """", 1, False)
    End Sub

    Any assistance to resolve this would be appreciated
    Unable to add code tags to this post for some reason
Results 1 to 1 of 1

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1