Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Workbook_Open()
Dim cell as Range Worksheets("Schedule").Activate for each cell in Rows(1).Cells if cell.Text = Format(date,"mm/d") activeSheet.Unprotect cell.EntireColumn.Locked = True activeSheet.Protect exit for end if Next End Sub Put this is in the workbook.open event [Chip Pearson's page on events - http://www.cpearson.com/excel/events.htm] See help on the protect and unprotect methods for arguments (like password). -- Regards, Tom Ogilvy "Shobhit Bhatnagar" wrote in message ... Hi, I want to lock/protect column of a particular date once the date changes. I tried doing it with different vba codes but no use. Eg. if the date is 25th October,2004, the column with the same date should get locked/protected once the date system date changes. Thanks in advance for your help. Shobhit Bhatnagar Date10/110/210/310/410/510/610/710/810/910/1010/1110/1210/1310/14 Parameters a b c d e f |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locking column headers | Excel Discussion (Misc queries) | |||
Locking Formula - Whole Column | Excel Discussion (Misc queries) | |||
Locking a Column | Excel Discussion (Misc queries) | |||
Locking column entries to an adjacent linked column | Excel Discussion (Misc queries) | |||
Locking column | Excel Programming |