Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 52
Default protection with password

I have a macro that turns worksheet protection off before
it runs, then turns it back on after it's done.

Can I embed a password in the macro instructions that
activate and deactivate protection so that a user cannot
just go through the menu to turn off the protection?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default protection with password

activesheet.protect Password:="ABCD"

activesheet.unprotect Password:="ABCD"

look in excel vba help for other arguments to protect and unprotect.

Also, try recording a macro while you do it manually (assigning a password
as well).

--
Regards,
Tom Ogilvy

"Bob" wrote in message
...
I have a macro that turns worksheet protection off before
it runs, then turns it back on after it's done.

Can I embed a password in the macro instructions that
activate and deactivate protection so that a user cannot
just go through the menu to turn off the protection?



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 Kiley Excel Discussion (Misc queries) 7 October 8th 09 02:25 PM
password protection Rover Excel Discussion (Misc queries) 7 March 12th 09 10:50 PM
password protection Poonam Excel Discussion (Misc queries) 2 September 22nd 07 04:44 PM


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