Password Protecting an Excel file problem

T

Tolga

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
 
T

Tim879

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
 
T

Tolga

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top