Default File Location

D

DJG

I have to change my default file location within Excel
each morning after rebooting my network connected PC.
Anybody know why this is? It's something I've never had
to do.

We're using Office 97 on a W2K OS.

Thanks.
 
D

Dave Peterson

Two guesses come to mind.

1. You want your default folder to be on a network share and that share isn't
available.
2. You don't have sufficient permissions to update the registry--so every
change you make is temporary--it's never kept.

From a previous post:

This is one of those settings that's kept in the windows registry.

For me (win98/xl2002), it's in:

HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel\Options
under a Stringvalue of: DefaultPath

You could use:
windows start button|run|regedit
follow the path (adjust 10.0 to your version of excel)
double click on DefaultPath and change it there

If you're hesitant, back up the registry before making any change. In fact,
that's probably a good idea anytime!

I have:
C:\my documents\excel
for my entry.

Maybe there's some permissions to the windows registry that's stopping you????

=====
At work, if I'm not connected to the network, my default path reverts to
somewhere on my C:\ drive. When I logon and I'm connected to the network, I
want it on my U: (home drive).

I've got a workbook in my XLStart folder that does the work for me. Each time I
open excel, this workbook loads and tries to fix my default folder. Then closes
(I don't need it anymore).

This is the little macro that runs on opening:

Option Explicit
Sub auto_open()

'Dim FSO As Scripting.FileSystemObject
Dim FSO As Object

Const myDefaultFolder As String = "U:\my u documents\excel"

'Set FSO = New Scripting.FileSystemObject
Set FSO = CreateObject("scripting.filesystemobject")

With Application
If FSO.FolderExists(folderspec:=myDefaultFolder) Then
.DefaultFilePath = myDefaultFolder
ChDrive myDefaultFolder
ChDir myDefaultFolder
Else
MsgBox "DefaultFilePath not reset, still: " & .DefaultFilePath
End If
End With
ThisWorkbook.Close savechanges:=False

End Sub

If nothing else works, you could use something like this.
 
Top