Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Specifying working folder

Using a network drive can be a problem--if the network is down or if you just
can't connect to the network.

For the recovery file location, I'd use a local drive. It would be faster, too.

Fred Smith wrote:

Thanks, I think I'll use this. I had specified a network folder, but I like
the idea of using the local disk better.

Thanks for your help,
Fred.

"Dave Peterson" wrote in message
...
I think mine hasn't been changed from the default location.

Just in case you want to use that...

C:\Documents and Settings\(username)\Application Data\Microsoft\Excel\

(under winxp home and xl2003)

Fred Smith wrote:

Bingo. Application.AutoRecover.Path was the problem. I changed it to an
existing folder, and solved my problem.

Thanks,
Fred.

"Dave Peterson" wrote in message
...
There aren't too many places where a drive and folder are specified in
tools|Options.

One was the defaultfilepath. But another is the alternate startup
folder.

Try:
?application.AltStartupPath
if it points to that troublesome folder, then change it to ""
application.AltStartupPath = ""

Another drive path to try is:
?application.AutoRecover.Path

You could start excel in safe mode:
close excel
windows start button|Run
excel /safe

And search for more drive/folders. But you'll have to open excel
normally
to
change them.

Fred Smith wrote:

Dave,

I tried the VBA command, but no success. I even confirmed with
?Application.DefaultFilePath that the new path was set. However, I
still
get
the same error message.

Any other ideas?

Regards,
Fred.

"Dave Peterson" wrote in message
...
If Gord's suggestion doesn't work...

Try opening excel.
Hit alt-f11 to get to the VBE (where macros live)
hit ctrl-g to see the immediate window
type this:
Application.DefaultFilePath = "h:\fred smith\"
and hit enter

Then back to excel to test.

Just a word of warning. If you've been assigned a laptop and you
don't
always
connect to the network, then excel will realize that this can't be
your
default
file path and change it what it likes. (Same thing if you use any
pc
that
doesn't always connect to the network, actually.)

I used to keep a workbook in my XLStart folder that contained this
macro:

Option Explicit
Sub auto_open()

'Dim FSO As Scripting.FileSystemObject
Dim FSO As Object

Const myDefaultFolder As String = "X:\my folder\myfolder2l"

'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 you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Fred Smith wrote:

Our head office, in their wisdom, moved our network drive from F:
to
H:.

Now I can't make any changes to ToolsOptions..., because anytime I
click
on
a tab, it fails with "Excel cannot find F:/Fred Smith".

How do I tell Excel the working folder is now in H:/Fred Smith?

Using XL2003, Windows XP.

Thanks,
Fred.

--

Dave Peterson

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change the default working folder Scott Setting up and Configuration of Excel 1 March 7th 08 10:31 PM
how can i change my default working folder to a networked folder? wizard1154 Excel Discussion (Misc queries) 4 April 18th 07 07:29 PM
How to decide folder-depth or How to select more folders/subfolders (folder-tree) ? Subteam Excel Discussion (Misc queries) 2 May 7th 06 08:14 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven Excel Discussion (Misc queries) 1 January 24th 06 03:28 PM
working folder David Excel Discussion (Misc queries) 1 January 10th 05 08:52 PM


All times are GMT +1. The time now is 12:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"