Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting an Open-file password
Hi All,
Can anyone assist me in the code I need to write to password protect a file so that the user is prompted for a password when attempting to open the file. Kind Regards, Terry |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting an Open-file password
Hi Terry
no code needed, save the file using file save as ... choose tools in the dialog box toolbar, general options - and you can then set a password to open and /or a password to modify. -- Cheers JulieD check out www.hcts.net.au/tipsandtricks.htm ....well i'm working on it anyway "Terry" wrote in message ... Hi All, Can anyone assist me in the code I need to write to password protect a file so that the user is prompted for a password when attempting to open the file. Kind Regards, Terry |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting an Open-file password
Hi Julie,
The excel file is created in an automated process from DTS within MSSQL 2000. Thanks, Terry "JulieD" wrote: Hi Terry no code needed, save the file using file save as ... choose tools in the dialog box toolbar, general options - and you can then set a password to open and /or a password to modify. -- Cheers JulieD check out www.hcts.net.au/tipsandtricks.htm ....well i'm working on it anyway "Terry" wrote in message ... Hi All, Can anyone assist me in the code I need to write to password protect a file so that the user is prompted for a password when attempting to open the file. Kind Regards, Terry |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting an Open-file password
Terry, following opens a file, if it doesnt have a password then saves it WITH the password then closes it. error handling (file should exist etc, pw cannot be zero lenght.. to be added. Sub OpenAndSaveWithPW(strFullPath$, strPW$) With Workbooks.Open(strFullPath, Password:=strPW) If Not .HasPassword Then Application.DisplayAlerts = False .SaveAs .FullName, Password:=strPW Application.DisplayAlerts = True End If .Close End With End Sub -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Terry wrote : Hi Julie, The excel file is created in an automated process from DTS within MSSQL 2000. Thanks, Terry "JulieD" wrote: Hi Terry no code needed, save the file using file save as ... choose tools in the dialog box toolbar, general options - and you can then set a password to open and /or a password to modify. -- Cheers JulieD check out www.hcts.net.au/tipsandtricks.htm ....well i'm working on it anyway "Terry" wrote in message ... Hi All, Can anyone assist me in the code I need to write to password protect a file so that the user is prompted for a password when attempting to open the file. Kind Regards, Terry |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can not open the Password file | Excel Discussion (Misc queries) | |||
open ftp file with password | Excel Worksheet Functions | |||
Setting a password on a Single File Web Page (mht; mhtml file) | Excel Discussion (Misc queries) | |||
Password to open file | Excel Discussion (Misc queries) | |||
Open file without Password | Excel Programming |