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

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?
Who is Participating?
Martin LissConnect With a Mentor Older than dirtCommented:
Private Sub Workbook_Open()
Dim sht As Worksheet

For Each sht In Worksheets

End Sub

Open in new window

Every sheet has a different password, or they are just protected?
brothertruffle880Author Commented:
Each sheet has its own password.  The Jan sheet has password "January", The feb sheet has "february", etc.
brothertruffle880Author Commented:
Thank you Martin.  Works perfectly.
Martin LissOlder than dirtCommented:
You're welcome and I'm glad I was able to help.

Marty - MVP 2009 to 2013
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.