cmccabe1
12-02-2015, 03:35 PM
I am trying to update variable in an excel VBA that are used with a batch file. The below doesen't look right but hopefully it is a good start. I set the batch file to just print the variables to ensure that they are being passed. Thank you :).
VB
' CALL AND UPDATE PERL '
Dim var As String, var2 As String, var3 As String, var4 As String
var = "MyDirectory"
var1 = MyDirectory & "sample_descriptor.txt"
var2 = "C:\cygwin\home\cmccabe\test_probes8.txt"
var3 = MyDirectory & "output.txt" (file that will result)
Set wshell = CreateObject("wscript.shell")
wshell.Run Chr(34) & "C:\Users\cmccabe\Desktop\EmArray\Design\perl.bat, var"
Batch File (perl.bat)
set "a=%1"
set "b=%2"
set "c=%3"
set "d=%4"
echo The directory is %a%
echo The samples are %b%
echo The probes are %c%
echo The output is %d%
pause
VB
' CALL AND UPDATE PERL '
Dim var As String, var2 As String, var3 As String, var4 As String
var = "MyDirectory"
var1 = MyDirectory & "sample_descriptor.txt"
var2 = "C:\cygwin\home\cmccabe\test_probes8.txt"
var3 = MyDirectory & "output.txt" (file that will result)
Set wshell = CreateObject("wscript.shell")
wshell.Run Chr(34) & "C:\Users\cmccabe\Desktop\EmArray\Design\perl.bat, var"
Batch File (perl.bat)
set "a=%1"
set "b=%2"
set "c=%3"
set "d=%4"
echo The directory is %a%
echo The samples are %b%
echo The probes are %c%
echo The output is %d%
pause