Protect Worksheet But Allow Some Features
Sep 5, 2007
I am trying to use protection in order to prevent users from only inserting a row or a column, sort, and autofilter. I don't think Userform is a good choice for this situation. I've tried using the following
Sub MyMacro()
ActiveSheet. Unprotect
'YOUR CODE
ActiveSheet.Protect
End Sub
The problem I'm running into is, when I protect the sheet from the main screen (allowing for everything but those listed above), then run MyMacro, the things that were previously allowed under protection are no longer allowed. Indeed, upon re-protection it prevents the user from accessing anything other then the very basics (selecting cells). How can I make it so that the protection works the same as before the macro?
View 4 Replies
ADVERTISEMENT
Jan 12, 2007
I have a sheet that is password protected. I have this code attached to a command button. It will unlock the worksheet, autofilter it, print it, unfilter it, and password protect the sheet again. However it is protecting it without a password. I need to have it protected with the password so that someone will not be able to just go to tools to unprotect the sheet.
Private Sub CommandButton1_Click()
ActiveSheet.Unprotect "rainforest"
Columns("O:O").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=">0", Operator:=xlAnd
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Selection.AutoFilter Field:=1
Selection.AutoFilter
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
End Sub
View 3 Replies
View Related
Oct 29, 2013
I'm using a Chart, Column, Clustered Cylinder. In the Select Data Source window I pick a (series) to edit.
The series value is, =Sheet1!$L$2:$L$5
This creates a column that contains the sum of values in specified range L2:L5 How do I add to this Series an additional limit that would be depicted as a "max budget" line that would appear as a line above the column?
=Sheet1!$L$2:$L$5+Sheet1!$O$2:$O$5
Where as I want ...Sheet1!$O$2:$O$5 to be the line above the column depicting max budget.
View 1 Replies
View Related
Mar 2, 2010
I'm trying to finish a project, but the features at the top of the ribbon are faded out which means I have no access to any of them. How do I get access to them?
View 9 Replies
View Related
Nov 8, 2007
I am using the following code to restrict what users are able to do with a Pivot Table I have designed:
Sub Workbook_Open()
Dim pf As PivotField
With ActiveSheet.PivotTables(1)
.EnableWizard = False
.EnableDrilldown = False
.EnableFieldList = False
.EnableFieldDialog = False
.PivotCache.EnableRefresh = False
For Each pf In .PivotFields
With pf
.DragToPage = False
.DragToRow = False
.DragToColumn = False
.DragToData = False
.DragToHide = False
End With
Next pf
End With
End Sub
However, I am getting a Run-time error with the 'For Each pf In .PivotFields' section after it has looped through all the Fields in my Pivot Table.
View 9 Replies
View Related
Apr 24, 2009
how to protect a worksheet from changes so that I am still able to change one cell on the worksheet but not any other cells.
View 2 Replies
View Related
Jul 11, 2013
How can I get my workbook to automatically re-protect a single worksheet in a workbook at the save-then-close point? It doesn't need to be password protected.
View 5 Replies
View Related
Mar 30, 2009
I found this link in numerous places on this forum to email just a single worksheet from a workbook using one macro.
HTML Code: ....
View 12 Replies
View Related
Jan 21, 2010
the user is prompted with a password inputbox to both protect and unprotect my worksheet named: Data. I am using Excel 2003.
View 3 Replies
View Related
Jun 7, 2008
I had the thought that maybe it would be possible to have a worksheet that is not protected when saved but when it is opened there would be a sub-routine under Sub_Workbook Open that would step through each sheet and assign a random password. And when the workbook is saved it is saved without passwords again.
In this way there would be nothing for a password cracker to pick at. The only flaw I see would be that the password to open the VBA module would need to be static and this would open up the programming to change and remove. But wouldn't this be effective against most users who would only know about the utilities to open the passwords and not the programming behind excel.
View 9 Replies
View Related
Jun 10, 2005
Is it possible to protect a hidden worksheet. I do not want them to be able to unhide the sheet unless they know a password to do so.
View 9 Replies
View Related
Jan 14, 2008
I want to copy a protected cell from one file to another, and still preserve the protected properties. Currently, the copied cell will be unprotected.
I have a lead that I might need to override ctrl-c function to my own VB script.
How do we override ctrl-c function? What lines to put in VB file?
View 9 Replies
View Related
Dec 20, 2007
We have a file that needs to be updated monthly by running macros, but the macros are being blocked by protection. I would like to put some code at the start of the macro that unlocks all sheets and then at the end locks them up again. Actually, all I really need is a macro to do just that unlock all sheets, and then another one that locks them back up again as we will need to lock and unlock at various times and it is annoying to have to do it by sheet ....
View 14 Replies
View Related
Jul 22, 2008
I know of the password protect feature to open a excel file or workbook, but does anyone know if this can be done for opening a worksheet.
I want to be able to view a worksheet after a password is entered, so therefore different worksheets have different passwords.
View 9 Replies
View Related
Oct 27, 2009
I have my spreadsheet protected and all the neccessary fields locked/unlocked, but one of the columns contains data validation. How can I prevent a user from copying and pasting a value into the data validation cell versus of course the intended purpose of picking from the list?
View 9 Replies
View Related
Oct 26, 2011
I have a file that needs to be locked down so that the end user does not have the ability to enter data where they shouldn't. The end users are very Excel illiterate, and have proven that I need to have high security in place. Here is my current VBA code - the purpose of which is to hide/unhide rows depending on data entries. (Disclaimer: this code may not be pretty as I am a VBA rookie, and I've begged borrowed and stolen from about 10 other threads on this board to get where I am, and yes it works).
Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "C7" Then Call Changeto1
If Not Intersect(Range("c9"), Target) Is Nothing Then
Rows("15:44").EntireRow.Hidden = True
Rows("15:" & Range("c9").Value + 14).EntireRow.Hidden = False
End If
[Code]...
The question is now....how can I unprotect the sheet so that this code works without allowing them to enter data where they shouldn't. I've been at this for days already.
View 7 Replies
View Related
Oct 28, 2009
I have my spreadsheet protected and all the neccessary fields locked/unlocked, but one of the columns contains data validation. How can I prevent a user from copying and pasting a value into the data validation cell versus of course the intended purpose of picking from the list?
View 9 Replies
View Related
Oct 30, 2006
I want to find a code to lock all the cells with data once a button is pressed and with the same button click i want the workbook to be saved.
View 5 Replies
View Related
Jul 9, 2007
I need to be able to save a copy of my spreadsheet but protect the structure so that the hidden rows cannot be opened by the person that I e-mail it to. At the moment I am using the current
Private Sub CommandButton2_Click()
Do
fName = Application.GetSaveAsFilename
Loop Until fName <> False
ActiveWorkbook.SaveAs Filename:=fName
Call ProtectRobin
End Sub
Private Sub ProtectRobin()
ActiveWorkbook.Protect ("Robin")
End Sub
The saving part of the macro is working perfectly, however I cannot get the protection to work. It must have a password - I do not want the receipient to be able to go 'Tools' > 'Unprotect Sheet'.
View 6 Replies
View Related
Dec 30, 2012
I know how to protect a worksheet with a password so that no one can amend the contents or view the formulas in the cells. And then we can un-protect the worksheet by clicking on the "review" tab in excel 2007 and so on. But recently I came across an excel sheet which was password protected and my query is that the "Review" tab was greyed out. What kind of protection was this that clicking on "review" tab option is also unavailable. And how does these kind of sheets get unlocked then.
View 2 Replies
View Related
May 9, 2013
In the attached file, I need four different passwords for Columns D, E, F, & G Respectively.
I had gone though below link and partially I could able to achieve what I need.
[URL]
However, the problem is at the end of this process we have protected the worksheet as well. This is not feasible for the process what I am working on.
how to apply different password without protecting worksheet.
View 5 Replies
View Related
Oct 15, 2008
I've attached an excel invoice template I've been making for our company. I'd like to protect all the cells except A12:H42, C8, B9, G4 and I44. The problem is, if I protect the worksheet (with these cells unlocked) then it won't let me run the macro (for inserting new rows for extra products).
View 5 Replies
View Related
Jan 21, 2009
Create a button for protecting the worksheet and a button for unprotecting the worksheet
View 13 Replies
View Related
Sep 14, 2009
I have the follwing macro that is used to hide certain rows: ......
View 11 Replies
View Related
Feb 1, 2013
I have a worksheet that is protected with data entry cells unlocked.
1. Unprotect worksheet
2. Lock all cells in the worksheet and then protect.
3. After a date in a cell in the worksheet.
I'm a newbie to vba and at least know vba is the only way. And this need to be automated.
View 1 Replies
View Related
Oct 5, 2006
Ok I've spent over 2 hours reading MANY peoples issues with this "BUG". Back in 2003 was the earliest... no one has an answer that works.
When you protect a worksheet and only have UNLOCKED CELLS selected...somehow through loading and unloading the file... you can select locked cells....
I can not find a pattern but many people have had this issue all with no concrete answers.
Just by loading and saving, exit and loading and saving, exit and loading.... i can now select locked cells that I previously couldn't. (I can't do anything as it's still protected...) It's a pain because it wrecks my tab flow.
View 9 Replies
View Related
Dec 10, 2006
I'm trying to protect a worksheet with a password using macro.
View 9 Replies
View Related
Mar 7, 2008
I am fairly new to Macros and such so please bare with me. I work with workbooks that have 30-50 worksheets in them. They are fairly complex and we send them out to our agents to use and need them protected so they cant change anything. I found how I can protect all the worksheets with one macro. There is one more part that I would like to add to this macro that I cant seem to find an answer for on these forums (Yes I have spent the better part of the day looking).
When you manually go to protect a page. It asks you to type in your password for the first time and below that there are a bunch of boxes that can be checked or unchecked. I need the first box "Select locked cells" to be unchecked. It is checked by default. Is there something I can add to my macro to uncheck this box?
This is the topic I used to create my Protect/Unprotect macro.
Macros to Protect/Unprotect Worksheets and Workbooks
View 9 Replies
View Related
Feb 16, 2014
I have an excel file with three worksheets in it. I can happily protect each sheet with a different password but what i want to be able to do is the following:
a. have a global administrator password for all the sheets - so i assume set the same password to protect the whole sheet
b. have individual passwords that only allow the user to insert rows and change data within restricted columns, i.e. can only edit columns A:Z and cannot manipulate any formulas within that range A:Z
I have excel 2010 if that makes any difference.
View 2 Replies
View Related
Feb 24, 2014
I have a sheet witch has a number of tick boxes and depending on the response a number of hidden rows may open to allow further info to be recorded, how do I protect the sheet in excel 2003 as unlocking certain cells & protecting the sheet will not work.
View 1 Replies
View Related