Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Is there a way to find out only the directory path without filename using VBA macro. I came across macros that will spit out only filename from the full path. Example: D:\Documents\ExcelPrograms\ Any help on this will be greatly appreciated. Regards Shilpa |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the Path property of the Workbook object.
Debug.Print ThisWorkbook.Path -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com wrote in message oups.com... Hi, Is there a way to find out only the directory path without filename using VBA macro. I came across macros that will spit out only filename from the full path. Example: D:\Documents\ExcelPrograms\ Any help on this will be greatly appreciated. Regards Shilpa |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
of what?
for an open excel file ActiveWorkbook.Path or ThisWorkbook.Path -- Regards, Tom Ogilvy wrote in message oups.com... Hi, Is there a way to find out only the directory path without filename using VBA macro. I came across macros that will spit out only filename from the full path. Example: D:\Documents\ExcelPrograms\ Any help on this will be greatly appreciated. Regards Shilpa |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
easy :)
msgbox activeworkbook.path or msgbox thisworkbook.path or workbooks("myworkbook.xls").path if it returns null then it has not yet been saved ben -- When you lose your mind, you free your life. " wrote: Hi, Is there a way to find out only the directory path without filename using VBA macro. I came across macros that will spit out only filename from the full path. Example: D:\Documents\ExcelPrograms\ Any help on this will be greatly appreciated. Regards Shilpa |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
http://CannotDeleteFile.net - Cannot Delete File? Try Long Path ToolFilename is too long? Computer Complaining Your Filename Is Too Long? TheLong Path Tool Can Help While most people can go about their businessblissfully unaware of the Windo | Excel Discussion (Misc queries) | |||
hyperlink to directory folder while highlighting filename | Excel Discussion (Misc queries) | |||
Dynamic directory path | Excel Discussion (Misc queries) | |||
Target directory & Path | Excel Worksheet Functions | |||
Set The Directory to the Current WB Path | Excel Programming |