I've got an Excel Spreadsheet which contains different values that I'm loading into two variables in VBA (an integer counter and an array).
I'm trying to pass those variable values from the VBA within Excel to a script in MS which will call a third party application and transfer the variable values into it.
For the sake of an example let's say I have variable in VBA called j with a value of 17. I'm looking to move that value (17) to a MS variable called i.
From VBA I'm running the following code to start the MS script and transfer the value.
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run """C:\Program Files (x86)\Macro Scheduler 14\msched.exe""TestTransfer /i=j"""
Now I am not a strong coder. I got the idea to use the code above from Google and I don't even know why the VBA is requiring all the quotes, I just know that errors are generated without them.
According to the MS help files I should be passing values as follows... /variable_name_in_MS=value_to_be_passed
The code above works in that it runs the MS script "TestTransfer"; however, the value that is passed to MS from VBA is "j" and not the value of "j" which is 17. Does anyone know how to pass the value of the variable and not the literal variable name?
Any thoughts or ideas are greatly appreciated.
Thank you!

Tom