Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with creating template for users, need to protect cells, but...

Hello all,

I am working on a workbook for a web page migration project. I have
developed a template with lots of validation; some through Data -
Validation lists and some use popups on the double-click event.

My problem is that when I finish the template, I am going to hand off
the template to another developer, who is programmatically going to
enter all the data and create lots of workbooks for various user
groups. Of course, this wipes out all the validation done by
Data-Validation, so I have code to add data validation back to the
appropriate columns every time the workbook is opened.

I also have a final validation routine that is called on the Save
event.

My problem is that when this workbook goes out to the users, mgmt wants
some of the cells to be read-only and they also want the users to be
able to copy and paste into other cells. But protecting the sheet
causes my code to recreate the data validation to break; you can't add
data validation to a protected sheet, even though the cell itself is
unlocked.

So, here's the problem: if the user copies and pastes into Column X,
the data validation is overwritten. When my validation routine runs,
if any of the pasted data is incorrect, the user will get an error
message and be told to select from the dropdown. But the dropdown will
no longer be there, having been overwritten by the pasting. (The
dropdowns contain up to 47 items, so I can't give the choices in the
error message.)

If you are still with me, my question is, can I use code to make cells
read-only in effect? Maybe using the selectionchange event to save the
old value to a global variable? i don't see a way to see that I have
LEFT a cell, though, to reset the cell value to the old value. Excel
seems to only have Target cells as parameters.

Has anyone ever done anything like this before??

Any ideas, war stories, references, resources, or good clean jokes
would be greatly appreciated.

Thanks,
Kathryn

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
protect worksheet but allow users to use specific columns/cells mexpedip Excel Discussion (Misc queries) 1 June 3rd 09 02:40 PM
Protect cells from other users w/out me having to enter pw Tara at Walsh Excel Discussion (Misc queries) 4 May 14th 07 10:40 PM
protect cells in excel to prevent users from deleting formulae locking cells in excel Excel Discussion (Misc queries) 2 June 14th 06 05:56 PM
How can I protect cells and allow users to insert/delete Jammy Dodger Excel Worksheet Functions 1 January 12th 06 10:20 AM
Protect cells in Excel so that users can only paste in text Mike Mayer Excel Programming 1 December 4th 03 01:21 AM


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

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"