+ Reply to Thread
Results 1 to 3 of 3

Locking The Cells with Input At The Time of Saving The File

  1. #1
    In Calif
    Guest

    Locking The Cells with Input At The Time of Saving The File

    Hi,

    How can I have any new input into the file to be locked at the time of
    saving, so the data can't be changed on the next time the file is opened
    again. Thanks for the help!

    In Calif



  2. #2
    cincode5
    Guest

    RE: Locking The Cells with Input At The Time of Saving The File

    In Calif

    Create a macro that protects then saves your file. If the file already
    exists this should do the trick:

    Sub ProtectSave()

    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    ActiveWorkbook.Save
    ActiveWorkbook.Close

    End Sub

    Note: This does not assign a password to unprotect the file. If you do not
    wish to exit the workbook at the time of Save, delete the 'Close' statement.

    --
    Regards...


    "In Calif" wrote:

    > Hi,
    >
    > How can I have any new input into the file to be locked at the time of
    > saving, so the data can't be changed on the next time the file is opened
    > again. Thanks for the help!
    >
    > In Calif
    >
    >


  3. #3
    In Calif
    Guest

    RE: Locking The Cells with Input At The Time of Saving The File

    Thanks cincode5, I didn't express my needs well. What I am looking for is to
    prevent users from making changes once the file is saved after their input.
    I am using this to track vacation, personal day off & sick day dates and
    hours taken. The users are given a date col & hrs col to input the date, I
    would like the input be protected once the file is saved but the rest of the
    empty cells in the col are still unprotected for future input.

    Vac Date Vac Hrs.
    1/23/2005 8 (Theses entries are protected after saving the file.)
    2/23/2005 4
    (Blank cells in the range are left
    unprotected.)

    Thanks again for your time and help!!!

    In Calif

    "cincode5" wrote:

    > In Calif
    >
    > Create a macro that protects then saves your file. If the file already
    > exists this should do the trick:
    >
    > Sub ProtectSave()
    >
    > ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    > ActiveWorkbook.Save
    > ActiveWorkbook.Close
    >
    > End Sub
    >
    > Note: This does not assign a password to unprotect the file. If you do not
    > wish to exit the workbook at the time of Save, delete the 'Close' statement.
    >
    > --
    > Regards...
    >
    >
    > "In Calif" wrote:
    >
    > > Hi,
    > >
    > > How can I have any new input into the file to be locked at the time of
    > > saving, so the data can't be changed on the next time the file is opened
    > > again. Thanks for the help!
    > >
    > > In Calif
    > >
    > >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1