View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default HELP! Get error while saving after password protection

It worked fine for me with the project protected (assume the file being
saved isn't the file with the code). Not sure what password protecting a
text file does - for me, it did nothing.

--
Regards,
Tom Ogilvy

"monica" wrote in message
...
If my excel vba code is password protected I will get erros at this line

of
code when trying to do a "save as" :

ActiveWorkbook.SaveAs FileName:=CSPath & ActSheet &
CSdata(loop1).csname, FileFormat:=xlTextWindows, Password:= "mypassword",
CreateBackup:=False.

How do I change the code so it can do a save on any excel workbook that
happens to have password protection on the vba project?