Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DGR DGR is offline
external usenet poster
 
Posts: 3
Default need a macro to lock sheet

I would like a simple macro that inserts my password into the 2 protection
fields when locking the sheet.
When I go to unprotect the sheets the file doesn't ask for the password?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default need a macro to lock sheet

Activesheet.Protect Password:="ABC"

Activesheet.Unprotect Password:="ABC"

are the commands.

Just another thought.
You need to save the workbook before closing if you want them to be in
effect when you open it.

--
Regards,
Tom Ogilvy


"dgr" wrote:

I would like a simple macro that inserts my password into the 2 protection
fields when locking the sheet.
When I go to unprotect the sheets the file doesn't ask for the password?

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
macro to unlock and lock cells in password protected sheet Chris Excel Discussion (Misc queries) 3 February 26th 10 09:06 PM
Write macro to lock selected sheet when run office3000 Excel Discussion (Misc queries) 1 October 14th 08 06:49 PM
is it possible to record a macro that would lock a sheet des-sa[_2_] Excel Discussion (Misc queries) 8 September 17th 08 09:41 AM
HOW TO LOCK THE OPENING OF A SHEET(TAB)? Excel Locker Excel Discussion (Misc queries) 3 September 20th 07 07:11 PM
lock tab in sheet 2 until cell in sheet one is completed john tempest Excel Worksheet Functions 7 November 24th 05 08:45 AM


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