?
Solved

VBA protect unprotect worksheet syntax

Posted on 2014-03-20
3
Medium Priority
?
731 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
[X]
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
3 Comments
 
LVL 48

Assisted Solution

by:jpaulino
jpaulino earned 2000 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 2000 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

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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.
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…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

801 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