It works perfectly on my spreadsheet.

I think you filled the dates using a formula.  Change xlFormulas to
xlValues.

It would also be good to put Dim r as Range at the head of the macro.

Regards
David Grugeon



On 15 March 2013 23:47, Prashant Pednekar <prashant...@gmail.com> wrote:

> Dear Dave, and other friends.
>
> I am using belwo code for locking rows. It is not working. Can you let me
> know where i am going wrong. my date value is in first column.
>
> Private Sub Worksheet_Activate()
>     ActiveSheet.Unprotect
>     Rows("5:1200").Locked = True
>     With Range("A5:A1500")
>         Set r = .Find(Date, LookIn:=xlFormulas, lookat:=xlWhole)
>         If Not r Is Nothing Then Rows(r.Row).Locked = False
>     End With
>     ActiveSheet.Protect
> End Sub
>
> Regards
> Prashant
>
>
>
> On Wed, Jan 20, 2010 at 5:12 AM, Selva <s.selvarathi...@gmail.com> wrote:
>
>> Hi,
>>
>> I need some assistance in unlocking a range of cells based on date
>> conditions
>>
>> For example, B1:B32 has dates for the month and based on today's date,
>> it should unlock the entire column to allow the user to enter the
>> data.
>>
>> It should not allow the user to enter data for yesterday or
>> tomorrow.......
>>
>> Cell should be open only for today's date.
>>
>> Thanks for your help.....
>>
>> --
>>
>> ----------------------------------------------------------------------------------
>> Some important links for excel users:
>> 1. Follow us on TWITTER for tips tricks and links :
>> http://twitter.com/exceldailytip
>> 2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
>> http://www.excelitems.com
>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>> If you find any spam message in the group, please send an email to:
>> Ayush Jain  @ jainayus...@gmail.com
>> <><><><><><><><><><><><><><><><><><><><><><>
>> HELP US GROW !!
>>
>> We reach over 6,700 subscribers worldwide and receive many nice notes
>> about the learning and support from the group.Let friends and co-workers
>> know they can subscribe to group at
>> http://groups.google.com/group/excel-macros/subscribe
>>
>>
>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to