Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
In Calif
 
Posts: n/a
Default 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   Report Post  
cincode5
 
Posts: n/a
Default

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   Report Post  
In Calif
 
Posts: n/a
Default

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
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
Locking cells Deepwater Excel Discussion (Misc queries) 2 September 7th 05 04:07 PM
How to get Excel to stop formatting time cells incorrectly Chuck Cusack Excel Discussion (Misc queries) 2 August 6th 05 01:10 AM
Subtracting Cells formatted with Date AND Time to get hours? mcr1 - ExcelForums.com Excel Discussion (Misc queries) 1 July 5th 05 09:08 AM
how do I format cells to change date and time to just date bondam Excel Discussion (Misc queries) 3 July 3rd 05 01:10 PM
split combined Time Date cells Mark Ada Excel Discussion (Misc queries) 2 December 1st 04 03:06 AM


All times are GMT +1. The time now is 06:03 AM.

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"