Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Upon closing a file each new row of entries in a spread sheet becomeread-only

I have a business spreadsheet. I want each new row of data to be made
unchangable (read-only) when the file is closed so entries will be
permanent when the spreadsheet is opened the next time. Changes need
to be able to be made during the session. If the information is
entered in rows 10 through 20 and columns A through M, I want only
these rows and columns to become read-only when the file is closed.
Anything outside of this range cannot be made to permanently change.
Most of these entries will reflect values from formulas. Can it be
done? Thank you for any help you might offer.

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Upon closing a file each new row of entries in a spread sheet become read-only

Michael,

I'm new at this but having played around here the following will protect
cells in A10:M20 which have text, numbers or formulas in them.
Put the code in Thisworkbook.
The protection is applied the next time you open the workbook.
It allows blank cells in range A10:M20 to be changed but not cells which
were not blank before the workbook was closed.
I hope this is what you were trying to describe.

Private Sub Workbook_Open()
Worksheets("Sheet1").Unprotect
Worksheets("Sheet1").Range("A1:IV65536").Locked = False
Worksheets("Sheet1").Range("A10:M20").SpecialCells (xlCellTypeConstants).Lock
ed = True
Worksheets("Sheet1").Range("A10:M20").SpecialCells (xlCellTypeFormulas).Locke
d = True
Worksheets("Sheet1").Protect
End Sub

DB


"Michael Lanier" wrote in message
...
I have a business spreadsheet. I want each new row of data to be made
unchangable (read-only) when the file is closed so entries will be
permanent when the spreadsheet is opened the next time. Changes need
to be able to be made during the session. If the information is
entered in rows 10 through 20 and columns A through M, I want only
these rows and columns to become read-only when the file is closed.
Anything outside of this range cannot be made to permanently change.
Most of these entries will reflect values from formulas. Can it be
done? Thank you for any help you might offer.

Michael



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Upon closing a file each new row of entries in a spread sheetbecome read-only

Thanks DB. I'll put it to the test tomorrow. It looks good except
I'm not sure yet how to generate a "trigger" that will cause the
applicable row(s) to protect. I suspect that if for example cell Z12
were to meet a condition, then the condition would cause the rest of
row 12 to protect. But somehow, I would have to build this into the
macro so that everytime a condition was met in column Z, the
applicable row(s) would protect. Regardless, you've given me
something to think about. Thanks.

Michael
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
Spread sheet calculating/not calc from opening file differently JimR Excel Worksheet Functions 0 January 16th 07 05:34 PM
can not open spread sheet file not recognised bikemad Excel Discussion (Misc queries) 0 October 23rd 06 08:58 PM
Mail merge a spread sheet omitting some entries Anglo Excel Discussion (Misc queries) 1 October 20th 05 04:01 PM
How can I transfer a Lotus 123-9 data spread sheet file to Excel? EDECHO Setting up and Configuration of Excel 2 August 26th 05 11:23 PM
Psswd protect a sheet automatically upon closing file Linking to specific cells in pivot table Excel Programming 1 June 1st 05 10:39 PM


All times are GMT +1. The time now is 03:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"