ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   get filename and filepath (https://www.excelbanter.com/excel-programming/285949-get-filename-filepath.html)

Robert Ehrlich

get filename and filepath
 
How can I get my own filename and filepath?
Is there any function which provides this?

Who can help?


Robert



J.E. McGimpsey

get filename and filepath
 
One way:

=LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1)))


In article ,
"Robert Ehrlich" wrote:

How can I get my own filename and filepath?
Is there any function which provides this?


Stuart[_13_]

get filename and filepath
 
MsgBox ActiveWorkbook.Path & "\" & ActiveWorkbook.Name


Robert Ehrlich wrote in message
...
How can I get my own filename and filepath?
Is there any function which provides this?

Who can help?


Robert





Chip Pearson

get filename and filepath
 
Robert,

Use the Path and FullName properties of the Workbook object. For
example,

Debug.Print ThisWorkbook.Path, ThisWorkbook.FullName


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Robert Ehrlich" wrote in message
...
How can I get my own filename and filepath?
Is there any function which provides this?

Who can help?


Robert






All times are GMT +1. The time now is 10:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com