Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Worksheet Password Protection in VBA

Hi,

I have a workbook in which users are inputting data via
user forms. Each time data is entered, or the file changed
I am protecting the sheets, but without a password, using
the following script.

ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True

Is there script (or other method) that I can use to assign
a password so that the worksheets are protected with
password and cannot be amended by simply clicking
ToolsUnprotect Worksheet?


Help gratefully received
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Worksheet Password Protection in VBA

ActiveSheet.Protect "MyPassword"

--

Vasant



"Graham" wrote in message
...
Hi,

I have a workbook in which users are inputting data via
user forms. Each time data is entered, or the file changed
I am protecting the sheets, but without a password, using
the following script.

ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True

Is there script (or other method) that I can use to assign
a password so that the worksheets are protected with
password and cannot be amended by simply clicking
ToolsUnprotect Worksheet?


Help gratefully received



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to I reset a forgotten Excel worksheet protection password? tomprochaska Excel Discussion (Misc queries) 13 April 2nd 23 07:53 PM
Excel Worksheet Password Protection Christina Excel Worksheet Functions 2 March 19th 13 12:24 PM
use a macro to automate excel worksheet password protection Bodyshopman Excel Discussion (Misc queries) 2 July 25th 07 01:21 AM
Password protection of worksheet when copied and pasted. Shansi Excel Worksheet Functions 1 July 30th 05 12:23 AM
Setting worksheet protection password in VBA Mark Bochner Excel Programming 0 October 6th 03 10:59 PM


All times are GMT +1. The time now is 10:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"