Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Worksheet.Protect Question

Hi there,
I was experimenting with ActiveSheet.Protect function and
ran the following piece of code:

ActiveSheet.Protect True , True

then I was happy that the sheet was locked but when I tried
to run:

ActiveSheet.Protect False,False

to unlock the sheet got the message saying wrong password.

Now I can't unlock it. Do you know the exact syntacs of the command?
I tried several passwords (thought that "True" was the pasword parameter)...
but nothing helped.

Is there any default pasword? Sounds silly but any idea?

Cheers
Dusan
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Worksheet.Protect Question

Dusan,

I thought the syntax was "Activesheet.protect(password)" and "Activesheet.unprotect(password)". Maybe you're using a different version, or maybe this is the problem.

Also, it might be interpreting the password as the logical value True when you lock it, and then interpreting it as the string "True" when you try to unlock it. Maybe try the password = 1 (the value of TRUE)?

Eric
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
Protect Cells Question mpaino Excel Discussion (Misc queries) 0 August 11th 08 02:38 PM
Share Workbook/Protect Sheet Question Johnny Excel Excel Discussion (Misc queries) 2 October 4th 07 07:14 PM
How can i protect worksheet until a value is placed in a certain c CLR Excel Discussion (Misc queries) 0 November 30th 06 04:26 PM
protect the worksheet jinvictor Excel Worksheet Functions 1 May 4th 06 03:13 AM
How to protect a worksheet from being copied to another worksheet SurvivorIT Excel Discussion (Misc queries) 3 August 31st 05 01:53 PM


All times are GMT +1. The time now is 11:20 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"