Hi guys,
I’m sending a parameter from Excel VBA to a Xojo console application. The received argument is a string separated by semicolon that is splitted in order to store that data in an array. The problem is that the lenght of the argument is not major that 29 characters, and the variable sArg(2) only is the word “This”. I’m not sure if the argument received is broken by the event ‘Run’.
Anyone know if there is a restriction regarding to lenght of the characters sent to a console aplication …? Or someone know how to fix this ?
'XOJO Code
Dim sPar as String, sArg() as String
'Vars
sPar=args(1)
sArg=sPar.Split(";")
'Set workbook file
WB_FILE=sArg(0)
Select case sArg(1)
case "GetMsg"
Call GetData(sArg(2))
end Select
'VBA Code
sArg(0) = "WBTest"
sArg(1) = "GetMsg"
sArg(2) = "This one is a test"
sPath = "PathToConsoleApp"
Call ShellExecute(0&, vbNullString, "ConsoleApp.exe", sArg(0) & ";" & sArg(1) & ";" & sArg(2), sPath, 0&)
Thanks,