View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mouimet Mouimet is offline
external usenet poster
 
Posts: 41
Default Saving Workbook with Password using SaveChange

Hi
The macro create different files and replace the existing files quietly when
the user
close the main file. I dont want the user to see a box asking to replace the
files.
My problem is, one of them need to be save with a password to open.
I tried ActiveWorkbook.Protect ("Password") before the line
Activeworkbook.close
and it doesn't work. I tried after, ssame thing.
I think my problem is when I use the saveChange.
Do you have a solution. Thanks
Here part of the macro I'm using:
==========
' save file telephones

Application.DisplayAlerts = False
ActiveWorkbook.Close SaveChanges:=True,
Filename:="G:\2009\Infos\Telephones.xls"
Application.DisplayAlerts = True

' macro continue