![]() |
Need directory path without filename
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 |
Need directory path without filename
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 |
Need directory path without filename
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 |
Need directory path without filename
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 |
All times are GMT +1. The time now is 12:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com