Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default protect and unprotect

Hi - I am either missing something really simple or something else is
happening:

This works fine...
sub proc i_protect
Dim mySheet As Worksheet

For Each mySheet In Worksheets
mySheet.protect ("abc1234")
Next mySheet

end sub

This says the password is incorrect...
sub proc i_unprotect
Dim mySheet As Worksheet

For Each mySheet In Worksheets
mySheet.Unprotect ("abc1234")
Next mySheet

end sub

Any ideas?

Thanks

Andrew


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default protect and unprotect

Jackpot!

2 sheets had different passwords

Many thanks

Andrew


"Andrew" wrote in message
...
Hi - I am either missing something really simple or something else is
happening:

This works fine...
sub proc i_protect
Dim mySheet As Worksheet

For Each mySheet In Worksheets
mySheet.protect ("abc1234")
Next mySheet

end sub

This says the password is incorrect...
sub proc i_unprotect
Dim mySheet As Worksheet

For Each mySheet In Worksheets
mySheet.Unprotect ("abc1234")
Next mySheet

end sub

Any ideas?

Thanks

Andrew



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, unprotect Pyrite Excel Discussion (Misc queries) 0 August 15th 08 03:18 PM
Protect / unprotect function sg Excel Worksheet Functions 3 December 6th 07 05:43 AM
protect/unprotect a VBA Project mangesh_yadav[_213_] Excel Programming 6 May 27th 05 01:30 AM
Protect/unprotect worksheets davegb Excel Programming 2 May 17th 05 11:15 PM
Unprotect and protect.... Wilfrid Excel Programming 1 July 28th 04 03:13 AM


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