Question: Closing the current worksheet programmatically?

I have a worksheet that I want to close from within the same worksheet.

Does anyone have any ways of doing this?

I had hoped there might be something to do this in the Worksheet package -  but that's not really what that package is designed to do.

I can imagine something that raises a sufficiently problematic error code that causes the worksheet to kernel connection to be lost, but don't really know how to go about doing this in a reliable and nondestructive way.

Maybe there is a way to issue a system (or ssystem) command to kill the appropriate process? This would need to be sufficiently robust as to work for Windows, Mac, Linux, and Unix - as well as any other supported Maple platform.

Has anyone ever done this? If so, how did you do it?

Thanks in advance,


Douglas B. Meade  <><
Math, USC, Columbia, SC 29208  E-mail:
Phone:  (803) 777-6183         URL:
Please Wait...