ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get the path of the .xls file (https://www.excelbanter.com/excel-programming/408484-get-path-xls-file.html)

NateBuckley

Get the path of the .xls file
 
Greetings,

I currently am using one workbook to open another, now the sheet I open is
always located in "\HolSheets\holSheet.xls" and the original workbook is in
the folder that is the parent of the directory HolSheets. This will always be
so, yet not sure where they want me to copy the report once I've completed
it, so does anyone know how to get the root of the original workbook, so then
I only need to specify the path like this

rootPath & "\HolSheets\holSheet.xls"

Being playing around with the filesystem object but still learning that part.

Thanks in advance! (Hopefully that was clear enough)

Mike

Get the path of the .xls file
 

rootPath = Thisworkbook.path
rootPath & "\HolSheets\holSheet.xls"
"NateBuckley" wrote:

Greetings,

I currently am using one workbook to open another, now the sheet I open is
always located in "\HolSheets\holSheet.xls" and the original workbook is in
the folder that is the parent of the directory HolSheets. This will always be
so, yet not sure where they want me to copy the report once I've completed
it, so does anyone know how to get the root of the original workbook, so then
I only need to specify the path like this

rootPath & "\HolSheets\holSheet.xls"

Being playing around with the filesystem object but still learning that part.

Thanks in advance! (Hopefully that was clear enough)


NateBuckley

Get the path of the .xls file
 
I've been messing around with the Filesystem object, trying to do it that way.

Once again thank you.

"Mike" wrote:


rootPath = Thisworkbook.path
rootPath & "\HolSheets\holSheet.xls"
"NateBuckley" wrote:

Greetings,

I currently am using one workbook to open another, now the sheet I open is
always located in "\HolSheets\holSheet.xls" and the original workbook is in
the folder that is the parent of the directory HolSheets. This will always be
so, yet not sure where they want me to copy the report once I've completed
it, so does anyone know how to get the root of the original workbook, so then
I only need to specify the path like this

rootPath & "\HolSheets\holSheet.xls"

Being playing around with the filesystem object but still learning that part.

Thanks in advance! (Hopefully that was clear enough)



All times are GMT +1. The time now is 03:02 AM.

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