Excel VBA - Removing worksheet passwords from a group in one workbook

Posted on 2013-11-24
Last Modified: 2013-11-25
I have a workbook with an ever-changing number of worksheets (between 2 and 8).  Each worksheet has its own password and as soon I open the workbook up, I'd like to be prompted to unprotect each of the sheets.
Can someone help me code this?
Question by:brothertruffle880
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 47

Accepted Solution

Martin Liss earned 500 total points
ID: 39673490
Private Sub Workbook_Open()
Dim sht As Worksheet

For Each sht In Worksheets

End Sub

Open in new window


Expert Comment

ID: 39673911
Every sheet has a different password, or they are just protected?

Author Comment

ID: 39674011
Each sheet has its own password.  The Jan sheet has password "January", The feb sheet has "february", etc.

Author Closing Comment

ID: 39674210
Thank you Martin.  Works perfectly.
LVL 47

Expert Comment

by:Martin Liss
ID: 39674966
You're welcome and I'm glad I was able to help.

Marty - MVP 2009 to 2013

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question