I'm trying to send a string variable to command prompt using vba excel. I'm using following code:-
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
While calling perl script at line "oWsc.Exec("perl F:\My_work\hello_world.pl code_name version label")" i want to send original contents of string variable code_name,version,label; but its sending the variable names as it is and not the content; Can anyone help me with this? Thanks in advance.