Excel Guides

Easily Changing the Default Drive and Directory in Excel

When it comes to changing the default drive and directory in Excel, there are a few different ways that you can go about doing this. For starters, you can simply change the default drive and directory within the Excel application itself. To do this, simply click on the "File" tab and then select "Options." From here, click on the "Advanced" tab and then scroll down to the "General" section. Within this section, you will see an option that says "Default file location." Simply click on this option and then enter in the new default drive and directory that you want to use. Once you have done this, simply click on the "OK" button and your changes will be saved.

Another way that you can change the default drive and directory in Excel is by changing it through your computer's operating system. To do this, simply open up your "Control Panel" and then select "System." Once you are in the "System" window, click on the "Advanced system settings" link located in the left-hand sidebar. From here, click on the "Environment Variables" button located near the bottom of the window. Within the "Environment Variables" window, find the "Path" variable within the list of user variables and double-click on it. Within the "Edit environment variable" window, simply add or modify the path so that it points to your desired default drive and directory. Once you have made your changes, simply click on the "OK" button twice to save your changes.

If you want to change your default drive and directory every time you open up Excel, then you can create a macro that does this for you automatically. To do this, simply open up Excel and press Alt+F11 to open up the Visual Basic Editor. Within the Visual Basic Editor, create a new module by clicking on Insert > Module. Within the module code window, paste in the following code:

Sub ChangeDefault() 
Dim strPath As String 
strPath = "C:\Users\YourName\Documents\" 
ThisWorkbook.FollowHyperlink strPath 
End Sub

Of course, be sure to replace "C:\Users\YourName\Documents\" with your actual desired default drive and directory.

Once you have entered in this code, close out of the Visual Basic Editor and return to your workbook. To test out your new macro, simply press Alt+F8 to open up the Macro dialog box. From here, select your macro from the list and click on Run. Your default drive and directory should now be changed!

Move beyond 

Excel

Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.