Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually, the workbook will be in another directory.
"Kevin H. Stecyk" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Patrick,
Can you substitute the new directory in place of Filename:=ThisWorkbook.Path? Kevin Patrick wrote, Actually, the workbook will be in another directory. "Kevin H. Stecyk" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes
New code looks like this: Workbooks.Open Filename:="C:\Documents and Settings\Patrick\Desktop\Backup Board Assignments Template.xls", Password:="snapple", ReadOnly:=True "Kevin H. Stecyk" wrote in message ... Patrick, Can you substitute the new directory in place of Filename:=ThisWorkbook.Path? Kevin Patrick wrote, Actually, the workbook will be in another directory. "Kevin H. Stecyk" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Not your usual password question! | Excel Discussion (Misc queries) | |||
VBA Password Question | Excel Worksheet Functions | |||
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. | Excel Worksheet Functions | |||
Password Loop question. | Excel Discussion (Misc queries) | |||
A password question | Excel Programming |