View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter Rooney Peter Rooney is offline
external usenet poster
 
Posts: 325
Default Problem saving to network drive

I have a solution.

If I use a string to specify the folder like \\Servername\MyFolder\My
SubFolder etc i.e. one that begins with a double backslash, that's when the
problem occurs.
If the string begins with a drive letter, then no problem.
Not ideal, as not all my users will me mapped to the network drive in the
same way, but by picking up the foldername value from a cell on the worksheet
that they can alter, at least they can customize it and the value doesn't
need to be hardcoded.
I wonder why Excel doesn't like double backslashes?

Have a good weekend, all

Pete



"Peter Rooney" wrote:

Good morning, all,

I posted a similar question a few days ago, but I think it might have got
lost, so I'll try again.
I have a number of workbooks that contain a macro to save to a network drive
and a macro to save to a local drive.

If I open a workbook and run its networksave macro, I get a runtime message
1004 "Cannot access file xxx.xls"

If however I open the workbook, first run its localsave macro (which runs
OK) and THEN run the networksave macro, then everything is OK.

I can then run the networksave macro as often as I want, but if I close the
file and open it again, the problem reoccurs.

I'm not going to post the code as, since it runs OK after I've done a local
save, I don't think there can be anything "wrong" with it. As the problem
occurs over a number of different workbooks, I don't think that it's a
workbook corruption issue, either. And nobody else has the workbooks open.

Can ANYONE help, please?

Yours in desperation

Pete



Can anyone sugge