Hy there,
I hope, we are talking about the same problem, mine was to start Mathcad from within VB, send data to it, let it recalculate and get the answer.
First thing is to start the Mathcad app. Therefore you need to add the reference "Mathcad Automation 1.0 Type Library" to your VB project which was available right after the Mathcad installation.
Then you need to create a Mathcad object. I did this in two steps:
- create an OLE object on a form ("MathCadOLE"

- create a Mathcad object in the code:
Dim McadObj1 As MathcadOld
Then you start the Mathcad app and open your document:
'frmMain.MathCadOLE.CreateLink ("C:\Temp\TestMCAD.mcd"

frmMain.MathCadOLE.CreateEmbed ("C:\Temp\TestMCAD.mcd"

Set McadObj1 = frmMain.MathCadOLE.object
I didn't figure out the difference between CreateLink and CreateEmbed.
After that, one can use the functions GetComplex, SetComplex
and Recalculate with the McadObj1 object. Furthermore you can access the worksheet property and have thousands of functions.
Now my first try to send data to Mathcad and back was to use the function PRNLESEN and PRNSCHREIBEN (I don't know the englisch counterpart) to read and write matrices to ASCII files but unfortunately the PRNSCHREIBEN wouldn't react on the Recalculate command.
So I used the functions SetComplex and GetComplex.
To set an array I'd dim the array as variant:
Dim Mr(1 To 3, 1 To 3) As Variant
Dim Mi(1 To 3, 1 To 3) As Variant,
fill the real part array with my values and send it to Mathcad via
Call McadObj1.SetComplex("in0", Mr, Mi)
It just ignores the imaginary parts if they are all set to 0.
Then it needs to be recalculated and the result can be got by
Label1.Caption = McadObj1.GetComplex("out0", ResR, ResI).
where ResR and ResI are just non-dimensioned Variants.
Well, I hope that helps. I don't know how to submit source code to a post in this forum, but if anyone is interested just leave me a note.
Cheers
Harald