Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-06-2015, 12:18 AM
gmayor's Avatar
gmayor gmayor is offline Unprotect Cells Windows 7 64bit Unprotect Cells Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You need to 'unprotect' the cells before protecting the sheet. e.g. as follows. You could include the date cell (as here B1) in the list of unprotected cells:

Code:
    With Sheets("MainDataEntryForm")
        .Unprotect Password:=""
        .Range("B1,B2,B7,B10").Locked = False
        .Protect Password:="", UserInterfaceOnly:=True
        .Range("B1") = Date
    End With

__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #2  
Old 01-06-2015, 05:15 PM
Cardinal2 Cardinal2 is offline Unprotect Cells Windows 7 64bit Unprotect Cells Office 2007
Novice
Unprotect Cells
 
Join Date: Feb 2013
Posts: 10
Cardinal2 is on a distinguished road
Smile Unprotect cells

Excellent works perfectly.
thank you very much
Cardinal3
Reply With Quote
Reply

Tags
unprotect cells



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to unprotect and search a Word2007 doc? pstein Word 1 05-31-2013 02:50 AM
protect and unprotect in shared excel mark-gabb Excel 0 01-09-2012 07:30 PM
ADD in That can unprotect the documents. aligahk06 Word 0 07-12-2010 04:55 AM
Unprotect header in Word Fran Word 0 12-23-2008 03:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft