ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I determine the file path with the file name at the end (https://www.excelbanter.com/excel-programming/374020-how-do-i-determine-file-path-file-name-end.html)

Quietman

How do I determine the file path with the file name at the end
 
This gets me the file name but need the path seperate

Path = Left(ActiveWorkbook.FullName, Len(ActiveWorkbook.FullName) - _
InStrRev(ActiveWorkbook.FullName, Application.PathSeparator))
--
Helping Is always a good thing

Jim Thomlinson

How do I determine the file path with the file name at the end
 
MsgBox ThisWorkbook.Path & vbCrLf & ThisWorkbook.Name
--
HTH...

Jim Thomlinson


"QuietMan" wrote:

This gets me the file name but need the path seperate

Path = Left(ActiveWorkbook.FullName, Len(ActiveWorkbook.FullName) - _
InStrRev(ActiveWorkbook.FullName, Application.PathSeparator))
--
Helping Is always a good thing


Quietman

How do I determine the file path with the file name at the end
 
thanks
--
Helping Is always a good thing


"Jim Thomlinson" wrote:

MsgBox ThisWorkbook.Path & vbCrLf & ThisWorkbook.Name
--
HTH...

Jim Thomlinson


"QuietMan" wrote:

This gets me the file name but need the path seperate

Path = Left(ActiveWorkbook.FullName, Len(ActiveWorkbook.FullName) - _
InStrRev(ActiveWorkbook.FullName, Application.PathSeparator))
--
Helping Is always a good thing



All times are GMT +1. The time now is 02:47 PM.

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