Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to lock cells after a certain days

How can I lock cells B1 to B10 if the date shown in cell A1 maller than today
2 days
please help.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default How to lock cells after a certain days

This little macro will lock cells B1:B10 when the file is opened if the date
in A1 is more than 2 days earlier than today's date. This macro must be
placed in the workbook module. HTH Otto
Private Sub Workbook_Open()
With Sheets("TheSheetName")
If Date - .Range("A1") 2 Then
.Range("B1:B10").Locked = True
End If
End With
End Sub

"Thu Ng" <Thu wrote in message
...
How can I lock cells B1 to B10 if the date shown in cell A1 maller than
today
2 days
please help.

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
lock cells John R Excel Worksheet Functions 5 May 3rd 08 12:10 AM
Lock Cells Neil Pearce Excel Discussion (Misc queries) 3 May 1st 08 04:05 AM
why do some cells not lock? CDecuir Excel Discussion (Misc queries) 1 April 16th 07 08:31 PM
lock cells. Miri Excel Discussion (Misc queries) 1 February 21st 07 09:42 AM
Lock Chart Display to last 14 days (or data points) toilinthedark Charts and Charting in Excel 1 September 21st 05 05:19 AM


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