Thank for the reply, appreciate your time.
The driving piece of the software would be Excel. With the data in excel being poked to mathcad solved and pushed back to excel.
I've done it the embedded way but I wanted to basically do the same process but remove the embedded mathcad to an external mathcad file which the VB code in excel activates and runs.
Tried DDE, got most of the code but no joy calling the program.
Tried embedding a mathcad OLE with a reference to external mathcad file which gives the solution (albeit unreliably) but this doesn't update automatically.
Here's the code from my DDE attempts if that helps anyone, however the API method would be a better option, or so the DDE haters tell me.
Thanks for your help so far everyone.
Sub McadData()
Dim PokeRange As Object
Dim Channel As Integer
Dim B As Variant
Set PokeRange = Worksheets("Sheet1").Cells(1, 1)
'mathcad = Shell("C:\Program Files\Mathcad\Mathcad 14\mathcad.exe", vbHide)
'Channel = Shell("F:\my documents\1.used daily\MathCAD\DDE method\ref\test.xmcd", vbHide)
Channel = Application.DDEInitiate( _
app:="Mathcad", _
topic:="F:\my documents\1.used daily\MathCAD\DDE method\ref\test.xmcd")
Application.DDEPoke Channel, "A", PokeRange
Application.DDEExecute Channel, "[Calculatedoc()]"
Application.DDEExecute Channel, "[Save()]"
bval = DDERequest(Channel, "B")
DDEPoke Channel, bval, Worksheets("Sheet1").Cells(2, 2)
Application.DDETerminate Channel
End Sub