To get workbook location (C:\My Documents\)
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1))-1)
Note: If you have never saved active workbook before, the first two formulas will return #VALUE! errors, while the formula =CELL("filename",A1) will return blank.