Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Password protection

Can anyone help me write 2 macros to turn on and turn off password
protection? I want to be able to add these to macros I already have so that
the user doesn't get the enter password screen. For arguments sake, the
password is "monkey".

Thanks,

Nick
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Password protection

Hi Nick,

sub Unprotect
dim ws as worksheet
for each ws in activeworkbook.worksheets
ws.unprotect "monkey"
next ws
end sub

sub Protect
dim ws as worksheet
for each ws in activeworkbook.worksheets
ws.protect "monkey"
next ws
end sub

Regards,
Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Password protection

That's great, thanks Ivan.

"Ivan Raiminius" wrote:

Hi Nick,

sub Unprotect
dim ws as worksheet
for each ws in activeworkbook.worksheets
ws.unprotect "monkey"
next ws
end sub

sub Protect
dim ws as worksheet
for each ws in activeworkbook.worksheets
ws.protect "monkey"
next ws
end sub

Regards,
Ivan


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
Password protection in macro ( Anybody can view my password in VB Sherees Excel Discussion (Misc queries) 2 January 24th 10 10:05 PM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
password protection Poonam Excel Discussion (Misc queries) 2 September 22nd 07 04:44 PM
Password Protection sitay1 Excel Discussion (Misc queries) 1 August 26th 05 03:15 AM
Password Protection cincode5 Excel Discussion (Misc queries) 1 August 4th 05 05:28 PM


All times are GMT +1. The time now is 08:01 AM.

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

About Us

"It's about Microsoft Excel"