The Path property gets the path to the worksheet, without the filename.
bStr = objMC.Path
Element
Description
bStr
A string containing the path to the worksheet.
objMC
A Mathcad Worksheet object.