View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
bruce2g bruce2g is offline
external usenet poster
 
Posts: 1
Default ActiveWorkbook.Save saves to wrong directory


I have the same problem. We have a bunch of spreadsheets, and from
time to time save them all by looping through workbook.save

Unfortunately, every once in a while, a spreadsheet will be saved to
the wrong directory! I don't think the user could have done it -
they're not sophisticated enough to do a 'save as' and look through all
the options.

What I've done as a workaround has been to do a saveas and explicitly
say what the folder is. I also had to inhibit the message about
replacing a file with application.displayalerts = false before the
saveas and .. = true afterwards.

I think there's a bug with windows 7 and excel 2007 that causes this,
I'd like to know if anyone else has encountered this problem.

Bruce


broro183;705841 Wrote:

hi Jerry,

Has the file previously been saved?
Do you have the right permissions to save it in the particular

directory?

If the file hasn't been previously saved, make sure that you explicitly

define the entire filepath to ensure that it saves in the right place.

Try checking [alt + t + o] - Save - Default File Location & emptying

this field if it's populated.

Is your current directory actually what you think it is?
You can check this in the VBE - [ctrl + g] to bring up the Immediate

pane and type in

VBA Code:
--------------------


?curdrive
--------------------



If it isn't the drive you expect to see, you can modify it within

your macro using the below (Google for examples).


VBA Code:
--------------------


chdrive
'and
chdir

--------------------





hth
Rob



--
bruce2g
------------------------------------------------------------------------
bruce2g's Profile: http://www.thecodecage.com/forumz/member.php?u=2042
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=197500

http://www.thecodecage.com/forumz


--- news://freenews.netfront.net/ - complaints: ---