View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kevin H. Stecyk[_2_] Kevin H. Stecyk[_2_] is offline
external usenet poster
 
Posts: 43
Default Password Question

Patrick Simonds...
I have a workbook which I have created as a template, which is password
protected.

Each week I want to be able to open that template file from within another
workbook, but can not figure out how to have the VBA enter the password
and then select read only. After the file is open I have some VBA code
which will save it to a set directory with a title based on the date.



Workbooks.Open Filename:=ThisWorkbook.Path & "\MyBook.xls",
Password:="TopSecret1", ReadOnly:=True

This assumes that the files are stored in the same directory.

HTH

Regards,
Kevin