Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Locking Cells from list

I have a list of cell addresses that I would like to build a macro for to
lock the cell when protection is enabled. The number of addresses that I have
is very large, so I don't want to have to key in each address by hand. Can
someone help me build a macro that will do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Locking Cells from list

by default, all cells are locked, so I assume you want to unlock all others

Activesheet.Unprotect Password:="ABC"
Cells.Locked = False
Range("A1,B9,C3:C5,F2,R32:Z29,M2,M5,M8").Locked = True
Range("Z1,AB9,AC3:AC5,BF2,BR32:BZ29,AM2,AM5,AM8"). Locked = True
Activesheet.Protect Password:="ABC"


--
Regards,
Tom Ogilvy


"Kurt Barr" wrote:

I have a list of cell addresses that I would like to build a macro for to
lock the cell when protection is enabled. The number of addresses that I have
is very large, so I don't want to have to key in each address by hand. Can
someone help me build a macro that will do this?

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
Locking Cells Jai Excel Discussion (Misc queries) 5 October 8th 09 01:25 PM
Locking Cells gpros32 Excel Worksheet Functions 9 October 9th 08 02:55 PM
locking formula in cells in without locking whole sheet SuziQ Excel Discussion (Misc queries) 1 July 21st 06 03:58 PM
Locking cells Deepwater Excel Discussion (Misc queries) 2 September 7th 05 04:07 PM
Protecting and Locking a Mail Merge List Trish[_3_] Excel Programming 0 April 29th 04 03:48 AM


All times are GMT +1. The time now is 03:01 PM.

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"