ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Password Protecting an Excel file problem (https://www.excelbanter.com/excel-discussion-misc-queries/178962-password-protecting-excel-file-problem.html)

Tolga

Password Protecting an Excel file problem
 
Hi,

I'm trying to password protect an excel file so that a user will be prompted
for a password in order to see that data sheet.

My colleagues are able to this by doing the following steps:
Save as, Tools menu, then General options, then setting a password within
here.

When i try to this i can only get as far as, Save as, then for me there is
an icon for tools instead of tools text menu. and when i do press this menu
i only get three options: Find, Add to favorites and Properties.

When i select properties nothing happens.

We all use the same Excel version (2000). My IT department have tried
reinstalling this version of Excel and even upgrading to 2003 but this has
still not solved the problem.

Can anyone help?

Thanks
Tolga

Tim879

Password Protecting an Excel file problem
 
Try using the attached macro.


Sub Save_Protected_WB()
'
' Saves a file as password protected to open / modify with password
entered by user
' Macro recorded 9/10/2007 by T. Bradshaw
'
'

On Error GoTo Exit_Save_Protected

Password = ""
ConfirmPassword = " "

CurrentWBName = ActiveWorkbook.FullName

While Password < ConfirmPassword
Password = InputBox("Please enter a password: ")
ConfirmPassword = InputBox("Please confirm the password: ")
Wend


ActiveWorkbook.SaveAs Filename:=CurrentWBName, FileFormat:= _
xlNormal, Password:=Password, WriteResPassword:=Password,
ReadOnlyRecommended:= _
True, CreateBackup:=False


Exit_Save_Protected:
Application.DisplayAlerts = True

End Sub





On Mar 6, 7:25 am, Tolga wrote:
Hi,

I'm trying to password protect an excel file so that a user will be prompted
for a password in order to see that data sheet.

My colleagues are able to this by doing the following steps:
Save as, Tools menu, then General options, then setting a password within
here.

When i try to this i can only get as far as, Save as, then for me there is
an icon for tools instead of tools text menu. and when i do press this menu
i only get three options: Find, Add to favorites and Properties.

When i select properties nothing happens.

We all use the same Excel version (2000). My IT department have tried
reinstalling this version of Excel and even upgrading to 2003 but this has
still not solved the problem.

Can anyone help?

Thanks
Tolga



Tolga

Password Protecting an Excel file problem
 
Hi Tim,

Thanks for your quick response. May sound like a silly question but how do
use the macro? Do i need to paste it somewhere?

Thanks

"Tim879" wrote:

Try using the attached macro.


Sub Save_Protected_WB()
'
' Saves a file as password protected to open / modify with password
entered by user
' Macro recorded 9/10/2007 by T. Bradshaw
'
'

On Error GoTo Exit_Save_Protected

Password = ""
ConfirmPassword = " "

CurrentWBName = ActiveWorkbook.FullName

While Password < ConfirmPassword
Password = InputBox("Please enter a password: ")
ConfirmPassword = InputBox("Please confirm the password: ")
Wend


ActiveWorkbook.SaveAs Filename:=CurrentWBName, FileFormat:= _
xlNormal, Password:=Password, WriteResPassword:=Password,
ReadOnlyRecommended:= _
True, CreateBackup:=False


Exit_Save_Protected:
Application.DisplayAlerts = True

End Sub





On Mar 6, 7:25 am, Tolga wrote:
Hi,

I'm trying to password protect an excel file so that a user will be prompted
for a password in order to see that data sheet.

My colleagues are able to this by doing the following steps:
Save as, Tools menu, then General options, then setting a password within
here.

When i try to this i can only get as far as, Save as, then for me there is
an icon for tools instead of tools text menu. and when i do press this menu
i only get three options: Find, Add to favorites and Properties.

When i select properties nothing happens.

We all use the same Excel version (2000). My IT department have tried
reinstalling this version of Excel and even upgrading to 2003 but this has
still not solved the problem.

Can anyone help?

Thanks
Tolga





All times are GMT +1. The time now is 12:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com