Excel VBA: Setting a Workbook-level default save directory

I want my workbook to have a default save directory, e.g. "n:\mydirectory\hello", So each time I open it and try to save it, it will suggest this directory regardless of which other Workbooks I have saved in other paths recently.


Using the Workbook_Activate event, you can change the "current directory" with the ChDir statement so that whenever you are working within this file, the default save directory will be changed to what you want.

Note: this will only help for new files that have not yet been saved; existing files, even if you do a Save-As will default to their own directory.

Need Your Help

Delete a repeating pattern in a string using Python

python regex

I have a JavaScript file with an array of data.