Solved

VBA protect unprotect worksheet syntax

Posted on 2014-03-20
3
705 Views
Last Modified: 2014-03-20
Folks,
I would appreciate what the connect syntax is to protect and unprotect a worksheet using VBA. What I have below doesn't work.

    Worksheet("Menu").Protect Password:="123"

Open in new window

0
Comment
Question by:Frank Freese
  • 2
3 Comments
 
LVL 48

Assisted Solution

by:jpaulino
jpaulino earned 500 total points
ID: 39943862
Is missing a "s" in the Worksheet ... it's Worksheets


Worksheets("Menu").Protect Password:="123"
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 39943866
Then use the unprotect method for the oposite:

Worksheets("Menu").Unprotect Password:="123"
0
 

Author Closing Comment

by:Frank Freese
ID: 39943903
thank you
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

749 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