Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Protecting & Unportecting the sheet.

Hi,

I have writen a macro and the report goes to my clients.

While running the macro the sheets should get unprotected & once is
procedure is done it should get protected again.

Here is my problem.

Code
'Sheets("Key Analysis").Unprotect
'Sheets("Additional Analyis").Unprotect

While unprotecting it is asking for a password which I dont want to
give to the clients


'Sheets("Key Analysis").Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
'Sheets("Additional Analyis").Protect DrawingObjects:=True,
Contents:=True, Scenarios:=True

While protecting it is not asking for a password it is smply
proctecting it without password.

Please help
Heera

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Protecting & Unportecting the sheet.


Try,

Sheets("Key Analysis").UnProtect Password:="Mypass"
'do something
Sheets("Key Analysis").Protect Password:="Mypass"

That will get around asking for the password but it provides only minimal
security. If your clients want to remove the pasword they could do so very
easily with a simple google search for 'Remove Excel passwords'.

Mike

"Heera" wrote:

Hi,

I have writen a macro and the report goes to my clients.

While running the macro the sheets should get unprotected & once is
procedure is done it should get protected again.

Here is my problem.

Code
'Sheets("Key Analysis").Unprotect
'Sheets("Additional Analyis").Unprotect

While unprotecting it is asking for a password which I dont want to
give to the clients


'Sheets("Key Analysis").Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
'Sheets("Additional Analyis").Protect DrawingObjects:=True,
Contents:=True, Scenarios:=True

While protecting it is not asking for a password it is smply
proctecting it without password.

Please help
Heera


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Protecting & Unportecting the sheet.

Can you give me some more information to protect it strongly so that
users cannot do any thing.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Protecting & Unportecting the sheet.

I did as you said and its working fine....

Thank you for your co-opration.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Protecting & Unportecting the sheet.

Hi,

There is no way to protect a worksheet or VB code that can withstand even a
slightly determined attack. This type of protection is to prevent accidental
deletions or to deter the casual fiddler. If you looking for security, Excel
can't provide it

Mike

"Heera" wrote:

Can you give me some more information to protect it strongly so that
users cannot do any thing.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Protecting & Unportecting the sheet.

Thanks for you update.

How can i hide my VBA codes so that no one can see the script.

Regards

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
Protecting a Sheet Shannan Excel Discussion (Misc queries) 7 September 30th 09 12:06 AM
protecting formulas without protecting sheet so grouping still wor JM Excel Discussion (Misc queries) 1 June 4th 09 06:42 AM
protecting sheet Art Cummings New Users to Excel 1 May 14th 09 06:14 PM
Protecting Sheet Nad Excel Programming 3 August 5th 06 06:30 PM
Protecting Sheet Stuart[_10_] Excel Programming 3 November 4th 03 04:44 AM


All times are GMT +1. The time now is 06:27 AM.

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"