Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
I've been trying to use Mathcad 15 embedded in an Excel 2007 spreadsheet. I can get PTC's example traject.xls and other spreadsheets to successfully open and use the embedded Mathcad worksheet but I can't figure out how to get rid of the Mathcad process that is created. Here's what happens in traject.xls:
1) Open traject.xls by double clicking
2) Excel then
a) opens with the file
b) a mathcad.exe process starts in task manager
c) updates using the embedded Mathcad object
3) I then close excel
excel.exe in task manager closes
mathcad.exe doesn't close
I have tried various times to access the Quit method under Mathcad's OLE Application class but VBA can't seem to ever find the method. Mulitple instances aren't created at least but I don't want to continue to consume a license when I'm not using Mathcad.
Has someone experienced this problem and found a solution? I've tried various methods posted on the web with no success yet. I'd appreciate a new traject.xls that corrects the problem.
Frank Lenning
Before I post this useless comment I want to apologise.
Why don't you get rid of Excel
Mike
Some reasons:
1) I want to create a "tool" that can be used by engineers that have little or no experience with Mathcad. Everyone seems to be comfortable with Excel and I can hide the calculation complexities so users only see input and answers. While i can do this in Mathcad using areas, I think Excel is cleaner at it.
2) With Excel, I can easily have different aspects of the analysis easily available to a user on different sheets. In the trailbrazer version I am working on, I can put a text overview of the analysis on one sheet, instructions for use on another and the actual "tool" that has only user input fields and a plot of results on yet another. I can still do this of course within Mathcad (by say putting overviews and instructions as references or again hidden areas) but not as neatly I feel.
3) Mathcad forces me to put user input gathering "above" the actual calculation. Excel allows me to separate input gathering from calculation/display of results. Separation means i can put a set of controls for input directly to the right of a plot displaying the results which i cannot do in Mathcad. I think this approach is much more intuitive again for users.
So, that said, I have my reasons for the approach I am taking but I am annoyed that I cannot seem to close the Mathcad instance that gets created by Excel in the process. An example of a successful automated closing of the embedded Mathcad worksheet in thermocouple.xls or traject.xls would be appreciated.
Thanks, Frank