View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RWN RWN is offline
external usenet poster
 
Posts: 104
Default "SaveAs" Generates error on shared drive

XL'03.
Upon conversion from '97-'03 I have a template macro that's generating an error.

The macro changes the filename and when it hits the "SaveAs" statement in the following;

Application.DispalyAlerts = False
ThisWorkbook.Saveas OutDir & OutFile

Application.DispalyAlerts = False

...it generates a " cannot access filename" error.

This only happens when the output directory ("Outdir") is on a shared drive and the user
has closed and re-opened the file.
In other words, the 1st time the template is opened, data updated and macro executed
(which can be multiple times) all is well.
If the user then closes the (newly named) file and later re-opens it, does updates and
attempts to run the macro, it generates the error.

I'm assuming something is different in '03?

--
Regards;
Rob
------------------------------------------------------------------------