Protect Sheet after an entry.

I have created a macro that allows users to enter specific info at the
beginning with a form. When they click on OK, the sheet is protected
but a specific range of cells is unlocked so that they can paste
specific data from another program. I want the entire sheet to become
protected (or to lock the cells again) as soon as the user pastes this
values to a cell. How can I do this?

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

0
10/14/2003 1:45:53 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
427 Views

Similar Articles

[PageSpeed] 37

In a Worksheet_Change event you can simply use Me.Protect. Right-click the
sheet tab, select View Code, enter this:

Private Sub Worksheet_Change(ByVal Target As Range)
    Me.Protect
End Sub

"gisro" <gisro.v9nhc@excelforum-nospam.com> wrote in message
news:gisro.v9nhc@excelforum-nospam.com...
> I have created a macro that allows users to enter specific info at the
> beginning with a form. When they click on OK, the sheet is protected
> but a specific range of cells is unlocked so that they can paste
> specific data from another program. I want the entire sheet to become
> protected (or to lock the cells again) as soon as the user pastes this
> values to a cell. How can I do this?
>
> Thanks
>
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~ View and post usenet messages directly from http://www.ExcelForum.com/
>


0
rumlas (268)
10/14/2003 2:08:43 AM
Reply:

Similar Artilces:

Password Protect Outlook #2
I work in an offcie environment and sometimes have to leave my PC unattended for just a few minutes. Unfortunately some confidential emails have been read by my staff and I need a way of safeguarding them other than turning off the PC, is there any way I can password protect access into my Outlook 2000, so all I do is close Outlook. (Sorry still operating under W95) Many thanks You can set a password on a Personal Folders File. If the folder list isn't visible in Outlook, click View | Folder List. Right-click the root folder (usually "Personal Folders" or "Outlook T...

protecting outlined data
I want to be able to use the expand/collapse function in outlines when the worksheet is protected. Copy this macro in a normal module It will run automatic when you open the workbook You can also use the workbook open event Sub auto_open() With Worksheets("sheet1") .Protect Password:="rbelecki", userinterfaceonly:=True .EnableOutlining = True End With End Sub Look in the VBA help for more information about protect(userinterfaceonly) -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "rbelecki" <rbelecki@l...

Quicken Password protected
I just got Money 2004 Deluxe, I am trying to import my data from Quicken and the program says there is a password for my quicken account that is required, but I never had a password. No way to get past this. Any ideas? If your data file is Q04, Money04 can only deal with Q03 or older. Otherwise, who knows? "Stephen Weiss" <stephenaweiss@comcast.net> wrote in message news:012f01c3cb22$9a957ac0$a101280a@phx.gbl... > I just got Money 2004 Deluxe, I am trying to import my > data from Quicken and the program says there is a password > for my quicken account that is req...

Re: Specification sheet
Dear Aladdin I have had another look at selecting the various specification items via check boxes, and the best way to go about this is by using user-forms. The down side to this is the fact that there will be a certain amount of coding that will need to be done in order to get the form working in conjunction with the contractors works order. But by no means impossible. If you do not feel confident in doing it yourself, I am sure that there are a number of IT contractors in your area who would be willing to help. Another alternative, and possibly not viable for you, is to use a data...

How to protect 2. axis in an Excel Chart to stay if data changes
A Pivot table is created on Tab1 in an Excel workbook. On Tab2 there is a Line Chart created with data from Tab 1 using 2 axis. If data in Tab1 change the 2nd axis on Tab 2 disappears, jumps ober and overrules axis 1. How can I protect chart area with 2 axis being able to change referring data in the pivot table. ...

Password protection on split database
I have a database which is split into front end and back end. The front end is password protected but the backend isn't Is it possible to protect both with the same password? I've tried protecting the backend with a password but when I open the front end it can't "see" the backend. Any ideas? Thanks Tony Put a password on the backend, then, after opening the front-end, use the Linked Table Manager to update the links (just like you would if you had moved the backend). You should be prompted for the 'missing' password during this process. You should only...

The procedure entry point StrTokEx could not be found
My customer recently had a massive spyware infestation. I got him cleaned up and all is working fine with one exception. When he runs Outlook XP, it fails during a send/receive with this error (subject line). Many have suggested removing and reloading OE to resolve this. However, when I go in to Add/Remove programs, under Windows Components, OE is not in the list. Any suggestions? ...

I Need to change reference sheet for all cells on a form
Good afternoon, I am copying a spreadsheet to make summary sheet and I need to change which sheet the cells are referncing on my copy. Some of the cells refer to for example, =PRIOR YEAR!B3, some of the cells use a command to Round(PRIOR YEAR!B3/100), I would like to change all the references that currently refer to "PRIOR YEAR" sheet and make them "CURRENT YEAR" sheet, so my references would look like this =CURRENT YEAR!B3 and Round(CURRENT YEAR!B3/100). I am curious if a paste special, or shortcut exists that can do this quickly so I dont have to go in and manual...

Sorting Multiple Sheets
I have a workbook with multiple sheets. The main sheet has 2 columns, 1 for first name, 1 for last name. The remaining sheets all have formulas to pull the first and last names automatically from the 1st sheet. If a user sorts the names on the first sheet, they will sort on subsequent sheets, but the information that goes with those names on subsequent sheets will not be included in the sort, thereby misplacing information. Is there anyway to remedy this, short of sorting each sheet each time there is an addition to any one sheet? ...

"Cannot shift objects off sheet"
I am new to Excel 2007. When I try to add rows/columns I get the message "Cannot shift objects off sheet". How do I fix this? http://lmgtfy.com/?q=Cannot+shift+objects+off+sheet http://blog.contextures.com/archives/2009/03/16/cannot-shift-objects-off-sheet-in-excel-2007/ http://support.microsoft.com/kb/211769 "Vickie" <Vickie@discussions.microsoft.com> wrote in message news:54A28B3A-CE1C-4130-AA70-D0FFF300A319@microsoft.com... >I am new to Excel 2007. When I try to add rows/columns I get the message > "Cannot shift objects off sheet&quo...

Protection
Hi everyone OK my problem is I am using an offie computer that everyone has access to and we cannot - and do not want to - change this. Is there a way that I can put a password for my profile on Microsoft outlook so that no one can read the new AND the old messages found in my inbox? You can put a password on your PST file, presuming you use a PST file... Emad Kamel wrote: > Hi everyone, > OK my problem is I am using an offie computer that everyone has > access to and we cannot - and do not want to - change this. Is there > a way that I can put a password for my profile on Micr...

CANNOT PROTECT
Trying to password and read only protect a Microsoft Word docuement that is embedded in Excel. When I open the "protected" document, the read-only prompt does not appear...and I can still make changes and close the docuement. HELP! Try this: create the document directly in word, protect it and save it to disk. Then copy the text you want and past it special as an OLE object in excel Peter ...

How to protect cells?
I would like to protect a range of cells (A2:D24) with a password for a group of users that would make changes to cells in this range. Then on the same sheet, also protect a range of cells (E2:E24) from everyone but me. Is this possible? Thanks. Mark, Please don't multipost. See the thread in .programming. John "Mark F." <m7829@yahoo.com> wrote in message news:FSzQb.10797$6o4.894@fe2.texas.rr.com... > I would like to protect a range of cells (A2:D24) with a password for a > group of users that would make changes to cells in this range. Then on > the same she...

Spreadsheet password protection
How do you password protect a spreadsheet. I can't find anything in the help section. You can prevent un authorised access by giving a password to open the workbook itself, so that no one else can open it (Go to Tools, Options and then Security Tab). You can do it there if you have already saved the file, or you can go to "save as" then "Tools" and "General Options" where you can give password. On the other hand you can protect work sheets and ranges for different people by using "Tools" and then "Protection" Tab -- M Imran Buha...

quick copy worksheet into other sheets in same workbook
I am wanting to copy a worksheet that is set up to show student results, targets and achievements into approximately 150 other worksheets in the same workbook. Is there a quick way of doing this other than copying and pasting? I want formats, colours and column widths etc to stay the same. In other words I want to produce about 150 identical copies of my layout as quickly as possible with the minimum of effort. I am using Excel 2003. Thanks in advance for any help and advice offered Right-click on the worksheet tab and select "Move or Copy", then use the dialog box that appear...

How to Activate "Show all" in a Protected Shared Workbook
Hi, I created a protected and shared workbook in Excel 2003 ,the default Filter Option is "Auto Filter" how can I use the "Show All" in Filtering.? even I unchecked the "Filter Settings" in "Tools-> Share Workbook -> Advanced -> Include Personal View " but it did not work. Thanks. You can't. If the workbook were not shared, then you could create your own macro that unprotects the worksheet, does the showall and reprotects the worksheet. But with the workbook shared, you can't change the protection of a shee...

Password protected sheet access
I have a spreadsheet protected with a unknown password. How do I access this sheet? Ps: the "read only" option is not available. Thanks, Rivane. Hi Rivane Is this the password for opening the file, or the one for unlocking locked cells in the already open sheet ? Best wishes Harald Excel MVP Followup to newsgroup only please. "Rivane Cardim" <rivane.cardim@exxonmobil.com> wrote in message news:0a8801c35dae$a03275a0$a301280a@phx.gbl... > I have a spreadsheet protected with a unknown password. > How do I access this sheet? > > Ps: the "read only...

can't rename a sheet
Hi, I got the following error when I tried to rename a sheet (chart) back to it� s original name: �Cannot rename a sheet to the same name as another sheet, a referenced object library or a workbook referenced by Visual Basic� Here�s what happened: I initially created a sheet named �mychart� I made another sheet �mychart(2)� by copying �mychart�, and deleted �mychart�. I found out �mychart� was still referenced in VBAProject as �chart4(mychart)�, even the sheet was deleted. And I couldn�t delete �chart4(mychart)� in VBA Project Explorer. Any way to fix it? Thanks a lot. I'm not sur...

Protecting a Worksheet
Does anybody know how to protect a workbook so that a user CANNOT unhide a sheet, CANNOT add rows to the viewable sheet, CANNOT alter locked cells, but CAN add text to a comments column which will expand and Wrap text as the comments increase in size? I understand how to protect/unprotect locked cells, but I cannot find the right combination for the above functionality. Is it even possible? Any help is greatly appreciated. Jeff When a _Workbook_ is protected (Tools, Protection, Protect Workbook, Structure) sheets cannot be unhidden. When a _Worksheet_ is protected locked cells ca...

comparing data in different sheets
I have data set for each quarter, like sales, profits, margins. The dat is for more than 1000 companies and in different worksheets: Eac quarter is in each seperate worksheet. It gets frustrating to keep on switching between each worksheet to ge a comparative number. Is there a way out -- Message posted from http://www.ExcelForum.com In situations like this I generally create a summary sheet and reference the cells from all of the other worksheets. Set up the layout for the summary sheet and then select a cell you want to mirror the value from another worksheet. With the cell selected, ...

Excel Sheet Protection
I am trying to protect a spreadsheet from any editing, while allowing the user to use the autofilter and sorting function. I tried checking the "Use AutoFilter" and "Sort" checkboxes in the Protect Sheet dialog box to protect the document. It does allow you to filter records based on selecting a value from the drop down list box of the autofilter, but it does not allow me to sort. Please help! If you have locked cells that are in the range to sort, then checking that box in the tools|Protection|protect sheet dialog won't work for you. You may want to provid...

protect a protected worksheet
I have got one Excel sheet which is password protected some of the users know the password , i dont want to allow these users to change some of the columns of the work sheet..but it should be open for me.. Maybe look into just protecting the cells that you do not want to be edited by anyone else. Password protecting a worksheet is scary since if it gets lost or forgotten it is a bear to get it unprotected. You can make the document read only also. Just some ideas. "darshan" wrote: > I have got one Excel sheet which is password protected some of the users know > the pas...

Can we update links automatically somehow after making a copy of a sheet with links?
Is there a way to do this that is not manual? Knowing the power of XL2K, it seemed wrong to me, somehow, that each time my supervisor makes a copy of a sheet, she has to fix the links manually. Any help would be greatly appreciated. I have a colleague who is working in this massive workbook at present, and she's daunted at all the new sheets to add that will require all this manual editing. Thank you! :oD You don't indicate exactly what you have to change, sheetnames, workbook names. Formulas or links that get changed would help. If you are copying more than one sheet that ...

To Norman or Alan Macro About Macros protected Sheets
Hi, Paul again, Sorry but I have a last question. When I type at the end of the Macro code: Sheets("Critical Path"),protect("My Password") What else do I need to type to enable the Auto filter & the Data Sort Thanks Paul. Your post is separated from the original thread. Are you using xl2002+? If yes, I got this line when I recorded a macro protecting a sheet, but allowing autofilter and sort: ActiveSheet.Protect DrawingObjects:=True, _ Contents:=True, Scenarios:=True, _ AllowSorting:=True, AllowFiltering:=True So... worksheets("cri...

Data protection
Hi, I have an excel sheet which an be used by many users. The sheet contains private information about each user. Now I want to protect the "private information" of one user from other (i.e when user_1 opens the sheet he only sees his information and not the information of any other user) Is it possible in excel ? Any protection in Excel and hidding of sheets can be cracked in minutes. Lots of free stuff to do that. It better to just send the user their individual sheet. Robert Flanagan http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel ...