ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Folder name (https://www.excelbanter.com/excel-programming/329724-folder-name.html)

John Peach

Folder name
 
In VBA how do I find the name of the folder my current workbook is saved to
?

Regards

John



Herbert

Folder name
 
Hi,

ActiveWorkbook.Path

That of course only returns a value if your workbook has been saved before.

Herbert



"John Peach" wrote:

In VBA how do I find the name of the folder my current workbook is saved to
?

Regards

John




Mike Fogleman

Folder name
 
ThisWorkbook.Path

If the workbook has not been saved yet, this will error.
Mike F
"John Peach" wrote in message
...
In VBA how do I find the name of the folder my current workbook is saved
to ?

Regards

John




AA2e72E

Folder name
 
A workbook that has not been saved would be saved to

application.DefaultFilePath

by default,

"Mike Fogleman" wrote:

ThisWorkbook.Path

If the workbook has not been saved yet, this will error.
Mike F
"John Peach" wrote in message
...
In VBA how do I find the name of the folder my current workbook is saved
to ?

Regards

John






All times are GMT +1. The time now is 03:57 PM.

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