Solved CMD String executes in CMD, but not in VBA.Shell

since the last parameter of your function is ParamArray (array), you do not need to create an Array.
you can directly call it:

Msgbpx RunCMD("echo", True, False, "VBA", "IS", "POWERFUL")
Understood. However, there may be instances where the caller wants to pass an array on top of other parameters.

This seems silly, but in practice has some logic.
 

Users who are viewing this thread

Back
Top Bottom