
You can run “VBScript file“!

Use “Run method” of “WScript.Shell object“!
VBA Code
For example, run following “VBScript file“:
*Show message.
MsgBox("Run VBScript file!")
'Normal return code
WScript.Quit(0)
'Error return code
'WScript.Quit(1)

You can run “VBScript file” by “Run method” of “WScript.Shell object“.
Option Explicit
Sub sampleProc()
Dim vbsFile As String
Dim wsh As Object
Dim result As Integer
'Set "VBScript file path"
vbsFile = "C:\Users\user\Desktop\sample.vbs"
Set wsh = CreateObject("WScript.Shell")
'Run the "VBScript file"
'Return
'┗0 : Succeeded
'┗1 : failed
result = wsh.Run(vbsFile, WaitOnReturn:=True)
If (result = 0) Then
MsgBox ("Succeeded")
Else
MsgBox ("failed ")
End If
Set wsh = Nothing
End Sub
Result
You ran “VBScript file“!

