2
我想发送一个字符串变量到命令提示符使用vba excel。 我使用下面的代码: -如何使用vba excel将字符串变量发送到命令提示符?
code_name = "xyz.c"
version = "def"
label = "1XDFO"
'open command prompt
Dim oWsc As Object
Set oWsc = CreateObject("WScript.Shell")
Dim oExec As Object
'save config spec in a text file
Set oExec = oWsc.Exec("perl F:\My_work\hello_world.pl code_name version label")
While oExec.Status <> 1 ' Wait for process
Sleep 1000
Wend
在呼吁Perl脚本在行 “oWsc.Exec(” perl的F:\ My_work \ hello_world.pl CODE_NAME版本标签 “)” 我想送原装字符串变量code_name,version,label的内容;但它发送变量名称,而不是内容;谁能帮我这个? 在此先感谢。