I'm trying to call an Excel sub or function from another application via DDE. So far I had succeeded calling any sub that has no parameters, via Run method, like this:
ch = DDEInitiate("excel", "system")
DDEExecute ch, "[Run(""test.xls!Test"")]"
Now I'm trying to call a sub with parameters:
DDEExecute ch, "[Run(""test.xls!Test"",123)]"
where Test is a sub with one Integer parameter.
When called, this results in Excel error: "Argument not optional". Any ideas what could be wrong there?
ch = DDEInitiate("excel", "system")
DDEExecute ch, "[Run(""test.xls!Test"")]"
Now I'm trying to call a sub with parameters:
DDEExecute ch, "[Run(""test.xls!Test"",123)]"
where Test is a sub with one Integer parameter.
When called, this results in Excel error: "Argument not optional". Any ideas what could be wrong there?