View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Monica Monica is offline
external usenet poster
 
Posts: 37
Default HELP! Get error while saving after password protection

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?