Hello, I am investigating connecting my companys Mathcad worksheets together with our Cad software. The cad part is already in place but when I started translating an example found in your helpfiles to c# regarding checking out setting/getting values from a worksheet i ran into some problems. I added the source(below) for the test i am running. Any hints to as what I am doing wrong here would be very much appriciated. Best regards, Tobias Svenberg ---------- Source code public partial class mathcadTest : Form { Mathcad.Application mc = new Mathcad.Application(); Mathcad.Worksheets wk; Mathcad.Worksheet ws = new Mathcad.Worksheet(); public mathcadTest() { InitializeComponent(); } private void doMathCadTest() { wk = mc.Worksheets; ws = wk.Open(@"c:\temp\mathcadtest1.xmcd"); ws.SetValue("a", "10"); ws.Recalculate(); try { string b = ws.GetValue("b") as string; MessageBox.Show(b); } catch (Exception e) { MessageBox.Show(e.ToString()); } ws.Close(Mathcad.MCSaveOption.mcDiscardChanges); System.Runtime.InteropServices.Marshal.ReleaseComObject(wk); System.Runtime.InteropServices.Marshal.ReleaseComObject(ws); System.Runtime.InteropServices.Marshal.ReleaseComObject(mc); } private void button1_Click(object sender, EventArgs e) { doMathCadTest(); } }