Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting Path Of .XLS?
I'm trying to get the complete path to the .XLS my VBA code is running
in. Actually, I just need the directory.... but either would do. So far, all I'm able to get is the application's directory (where Excel lives). ?? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting Path Of .XLS?
You can use either
ThisWorkbook.Path ' or ActiveWorkbook.Path -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) "PeteCresswell" wrote in message ... I'm trying to get the complete path to the .XLS my VBA code is running in. Actually, I just need the directory.... but either would do. So far, all I'm able to get is the application's directory (where Excel lives). ?? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting Path Of .XLS?
Be careful using ActiveWorkbook. The ActiveWorkbook can change while your
code is running and might not be the one you expected when you query the path property. "Chip Pearson" wrote in message ... You can use either ThisWorkbook.Path ' or ActiveWorkbook.Path -- Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) "PeteCresswell" wrote in message ... I'm trying to get the complete path to the .XLS my VBA code is running in. Actually, I just need the directory.... but either would do. So far, all I'm able to get is the application's directory (where Excel lives). ?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Remove end folder from path found with ThisWorkbook.Path command ? | Excel Programming | |||
Formula too long - new file path is shorter than old file path - Excel 2003 | Excel Worksheet Functions | |||
hyperlink navigation path path wrong in Excel 2003 | Excel Discussion (Misc queries) | |||
how to change absolute path to relative path | Excel Worksheet Functions | |||
Current path to Qualified Path | Excel Programming |