Hello,
I have a macro which saves two files, one that I use as a master and the other that users in the business use. The excel file is a series of pivot tables which are linked to an MS Access database.
The macro refreshes the pivot tables and then saves the data in two different locations. There is a password on the file as some of the data is sensitive. My problem is that the save macro states that the file is Run-Time error 1004 operation failed the file name and then is write reserved.
ActiveWorkbook.SaveAs "\\servername\directory\folder\filename.xls" _
, FileFormat:=xlNormal, Password:="password1", WriteResPassword:="password2", _
ReadOnlyRecommended:=False, CreateBackup:=False
I'm not too sure what how to get round this, the Excel help states to use the ChangefileAccess command which I tried to incorporate, but got lost along the way....
Can anyone help as I am not a VBA programmer ?????
Many thanks
Angie
I have a macro which saves two files, one that I use as a master and the other that users in the business use. The excel file is a series of pivot tables which are linked to an MS Access database.
The macro refreshes the pivot tables and then saves the data in two different locations. There is a password on the file as some of the data is sensitive. My problem is that the save macro states that the file is Run-Time error 1004 operation failed the file name and then is write reserved.
ActiveWorkbook.SaveAs "\\servername\directory\folder\filename.xls" _
, FileFormat:=xlNormal, Password:="password1", WriteResPassword:="password2", _
ReadOnlyRecommended:=False, CreateBackup:=False
I'm not too sure what how to get round this, the Excel help states to use the ChangefileAccess command which I tried to incorporate, but got lost along the way....
Can anyone help as I am not a VBA programmer ?????
Many thanks
Angie
Last edited: