Search TeachExcel.com
TeachExcel.com
TE
Teach Excel MS Office Tutorials Excel Consulting Services Excel Forum
Excel Video Tutorials Excel Tips Free Excel Macros Excel Help Resources Contact TeachExcel
Video Tutorials
  • Free Macros
  • Excel Help Directory
  • Excel 2007 Resources
  • Keyboard Shortcuts
  • Excel Forum
  • Contact/About

Tutorials: Security



Featured Tutorial
Dynamically Update Drop-Dowm Menus in Excel
Featured Macro
Delete Empty Rows in Excel

Password Protect Excel Workbook Files

Video | Similar Helpful Excel Resources

Bookmark and Share

You can password protect your excel files and make it so that only one person or only a select group of people can access the file. The file can also be made to be "read-only," which means that no one without a password will be able to edit any of the data but will still be able to view everyting in the excel workbook.
   Topics Covered
Password Protect Excel Files
Make "Read-Only" Excel Files
Increase the security of your data in excel
   Difficulty:         Easy
   Video:               Yes



Got a Question? Ask it Here in the Forum.



Similar Helpful Excel Resources

Un-password Protect Files Macro - Excel

View Content
I have 106 xls files. All of them are password-protected in the following format:

$ & *first four characters of file name* & 010808

For example, a files named Matthew.xls would have the password $Matt010808.

I have a macro that password-protected batches of files by this format but now I need one that unpassword-protects them.

Can anybody help?

Here is the macro that password-protects them:

Quote:

Sub SaveEncrypted()
'1. Select multiple .xls files
'2. Password protects them in the format: "$ + first four characters of file name + today's date" (e.g. $Matt100108)
'3. Encrypts and Saves them in Workbook95/5.0 format
'4. Stores the File Names and Passwords in a separate workbook.

Dim FilesToOpen
Dim filecounter As Integer
Dim wbName As String
Dim wbPass As String
Dim rowcounter As Integer

On Error GoTo ErrHandler
Application.ScreenUpdating = False

FilesToOpen = Application.GetOpenFilename _
(FileFilter:="Microsoft Excel Files (*.xls), *.xls", _
MultiSelect:=True, Title:="Files to Encrypt")

If TypeName(FilesToOpen) = "Boolean" Then
MsgBox "No Files were selected"
GoTo ExitHandler
End If

Application.DisplayAlerts = False

filecounter = 1
rowcounter = 2

While filecounter

Code To Password Protect All Files In A Dir. - Excel

View Content
The following code is what I have at this time to password protect an individual file when it is open.
When I run it it simply pops up a screen asking me to enter the password I want to protect the file with, I enter the file then click ok.
Code:

Sub Protect_sheets()
    Dim wSheet          As Worksheet
    Dim Pwd             As String
 
    Pwd = InputBox("Enter your password to protect all worksheets", "Password Input")
    For Each wSheet In Worksheets
        wSheet.Protect Password:=Pwd
    Next wSheet
 
End Sub


What I'm looking for is a a code that instead when run I want to 1st prompt me to select a directory and once selected have a 2nd prompt asking me to enter the password of my choice then lastly open each file within the chosen directory, protect it using the password just entered and saved. Can anyone assist?

Excel Macro To Unprotect/protect Password Protect Rows - Excel

View Content

Macro: Create Files, Password Protect, Attach To E-mail - Excel

View Content
I am trying to find a macro to create new password protected file everytime the value changes in column C. Then create an outlook e-mail to the e-mail address in column M with the new file attached. Is this even possible?

Password Protect Workbook - Excel

View Content
Very new to VB. Have managed to paste this code into a workbook:

Option Explicit

Private Sub Workbook_Open()
Worksheets("Sheet1").Activate
End Sub

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Dim ans
Dim sh2 As Worksheet
Application.EnableEvents = False
If ActiveSheet.Name <> "Sheet1" Then
Set sh2 = ActiveSheet
Sh.Activate
Application.ScreenUpdating = False
ans = Application.InputBox("Supply password")
If ans <> False Then
If ans = "password" Then
sh2.Activate
End If
End If
End If
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub

It works great, but would like to modify it so that I only need to enter the
password once to gain access to all worksheets, not each time I change
worksheets.

Much appreciated,
rob



Password Protect Workbook - Excel

View Content
I am using excel 2003 and need to be able to password protect several workbooks as well as giving a user the option to change the password.

Sheets within the workbooks have formulas protected to avoid user error and dont want them to be unpotected.

Is there a sinple way to achive this without the use of macros?

Many thanks in advance.

Password Protect Workbook - Excel

View Content
Hi,
I would like to password protect my workbook on activation can anyone help please, thanks Steve.

Workbook Password Protect - Excel

View Content
EXCEL - 2003

I have 2 macros that 1 will unprotect and 1 to protect the workbook with a unique password.

Also, in the same sheet, i have 2 macros that 1 will unprotect and 1 to protect multiple worksheets all with same paswords.

Problem: When i protect/unprotect the worksheet, it also updates/over-rides the password for the workgroup. Why?

Below is the code:

Workgroup:

Application.ScreenUpdating = False
ActiveWorkbook.Unprotect ("test")

Worksheets:

Application.ScreenUpdating = False
Dim sht As Worksheet
For Each sht In Sheets(Array("PG SP (wk1)", "PG SP (wk2)", "PG SP (wk3)", "PG SP (wk4)", "PG SP (wk5)", "PG SS (wk1)", "PG SS (wk2)", "PG SS (wk3)", "PG SS (wk4)", "PG SS (wk5)"))
sht.Protect Password:="Program"
Next sht

Am i doing something wrong??

Look Up Password To Be Used To Protect Workbook - Excel

View Content

Password Protect Workbook-how To? - Excel

View Content
new computer user aswell as excel

I find no way to password protect workbook. thanks

Contact | Privacy Policy | Disclaimer
Copyright© 2012 TeachExcel.com