Results 1 to 2 of 2

Thread: Save worksheet as read only based on specific cell being populated

  1. #1

    Save worksheet as read only based on specific cell being populated



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have an Excel spreadsheet that I inherited and need to make some changes. The worksheet is used to create a "Temporary Deviation" to our manufacturing process. I need to prevent others from extended the deviation once it is closed. I wanted to do so by make the worksheet read only (password protected) once it is saved as closed. I have a button that the user clicks to save the worksheet as closed. Looking for the code that would allow me to make read only based on a date (or text) being in that specific cell. I hope I am explaining clearly and any help would be appreciated.

  2. #2
    Conjurer WizzardOfOz's Avatar
    Join Date
    Sep 2013
    Location
    Australia
    Posts
    184
    Articles
    0
    As long as you realise that Excel's security is easily bypassed. It will stop most of the users but not all

    have a look at http://www.mrexcel.com/forum/excel-q...lications.html
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    SetAttr Me.FullName, vbReadOnly
    End Sub

    also read
    http://answers.microsoft.com/en-us/office/forum/office_2007-excel/readonly-vba/c2dff881-c53a-4a31-81e8-9ead3765bbc6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •