Protect All Sheets Then Save

Mar 15, 2008

I have a workbook with several Sheets. I wish to automatically protect all sheets with specific user permissions, i.e. Select Unlocked Cells, Insert Rows, Use Auto Filter and Edit Objects, as I would have available when using the manual approach. Also, I wish to invoke a Password in the process.

Additionally, I need this code to operate when the file is Saved or Closed... transparent to the user.

View 9 Replies


ADVERTISEMENT

Force To Save / Protect Macro

Dec 17, 2009

I've created a file where our accountmanagers can mace price calculations. But eversince i've added a macro to force them to fill the form completely, they have gone and tried to hack the macro (and with succes).

I now would like to add a protection for the macro, so they can only access VBA when "sheet1" is unprotected. How can i do this?

I also would like to create a macro so they only can save the file as a Macro Enabled Excel file (.xlsm),

how can i do this best? .....

View 9 Replies View Related

Protect Worksheet & Save Workbook

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

Macro To Protect Sheets

Mar 20, 2008

I have a workbook with some sheets password protected and other sheets not protected.

I have a macro that unprotects the sheets, but it requires the password to be typed multiple times.

I want to put the password into the macro so it doesn't require manual entry of the password lots of times.

Each sheet has the same password, so I would expect to enter it for the first sheet only.

What I have came from a simple macro recorder selecting each sheet in turn:

Sheets("wages").Select
ActiveSheet.Unprotect
Sheets("Comparative").Select
ActiveSheet.Unprotect

View 9 Replies View Related

Protect Sheets Using Macro ..

Sep 16, 2008

i use a macro to protect several sheets in a workbook.

When i protect the sheets, i only want to be able to cells and nothing else. How should i mdify the code below to do this? I tried record the macro and un checking the "select locked cells" box which is one of the only 2 boxes checked. It works, but then when i save the wb and re-open it it allows me to select locked cells.


Sheets("FF - WC").Select
ActiveSheet.PROTECT DrawingObjects:=True, Contents:=True, Scenarios:=True

Sheets("FF - UR").Select
ActiveSheet.PROTECT DrawingObjects:=True, Contents:=True, Scenarios:=True

View 9 Replies View Related

Protect Non Active Sheets

Nov 1, 2008

I have a workbook that has a sheet for every day of the month (1 to 31).

When it opens it automatically activates the sheet for the day corresponding today.

What I'm missing is how to enable users to only update that sheet.

Example today is the 1st, sheet 1 should be unprotected but all others protected and off course tomorrow it should be sheet 2.

View 9 Replies View Related

Protect Sheets Even If They Are Group In A Doc

Jan 17, 2009

I wanted and the solution is on two sheet which I grouped, make copied and move into a new book. This is fine, but then I want my code to lock/protect all of my sheet in my program document, this can't be done with my current code because the sheets are group.

View 9 Replies View Related

How To Protect Multiple Sheets In Workbook

Jun 19, 2006

How to protect multiple sheets in a workbook and not having to protect them 1 by 1. I have copied and pasted all the different macro's/visual basic script that has been posted for that purpose, but I can't get it to work and I'm always getting an error. The error from visual basic says "compile error: invalid outside procedure" and then the visual basic screen shows the following:

Range ("AM52")
If Ans >= 0 Then
"+."

It does not like the "AM52" part because it is highlighted in the error message.

Also, the error I get from recording my own macro step by step is "Run time error 40036" from visual basic.

View 8 Replies View Related

Protect Specific Sheets From Deletion

Dec 19, 2007

Is there anyway to prevent certain sheets from be deleted?

i know there is protect workbook, but that prevents the user from deleting any sheet

View 12 Replies View Related

How To Protect / Unprotect Multiple Sheets

Jan 27, 2012

I have a workbook where I password protect each sheet. Is there any way to quickly unprotect all sheets, make changes then protect all sheets. I cannot seem to do this by grouping multiple sheets. the option to unpropect/protect is not available.

View 6 Replies View Related

On Workbook Open Protect All Sheets?

Feb 19, 2012

Is there a simple one line VBA code to protect all sheets when a workbook is opened?

View 5 Replies View Related

Password Protect Multiple Sheets

Jul 29, 2003

I have a workbook with 7 tabs called "Sat" thro to "Sun". I'd like a macro which

a) protects the sheets as an array (as opposed to individually)

b) preferably uses a password

Using Excel 97 on Windows NT

View 9 Replies View Related

Password Protect Sheets From Viewing

Sep 12, 2006

I have a excel file with around 8 sheets in it and this file puted in the network to be shared with 8 persons So i need to make an individual password for each one to enter to his specific sheet and have full authorization to make anything in it and this done using userform where each one when open the file in the network , a user form open in first stage to select his name and put his own password with the ability to let each one to make his own password or change it from the userform

this file is shared so it may more one user open it and it may be there an save funtion at same time ( same time & same activities )

View 9 Replies View Related

Macro: Protect & Unprotect Sheets

Nov 9, 2006

Is there an easy way (using a macro) to unprotect and protect sheets?

Most sheets in a certain workbook are protected except a few cells that are open for manual entry. Because I have links to other cells in other workbooks, I must unprotect those sheets/fields before I can edit the links. And I MUST ensure all sheets are protected again when I'm done with my work.

Also, is it possible to password-protect that specific macro so I'm the only one who can run it to unprotect and protect?

View 9 Replies View Related

Unprotect & Protect All Sheets With Password

Dec 21, 2006

I have a series of workbooks where multiple users are entering data. Most of the cells are locked, and the worksheets are password protected. From time to time, I have to make global changes to all the workbooks. I've recorded a macro to open all the workbooks, but now, I'm running into a problem because for speed, I'd like to unprotect the worksheets and "re-protect" them without having to enter the password 3 million times (exagerration, but not much). What is the proper syntax of code to have VBA enter the password automatically (it is the same for all sheets).

View 4 Replies View Related

Password Protect Multiple Sheets With Macro

Jul 12, 2013

I have a spreadsheet with over a hundred tabs, each of which need to be password protected (same password).

I found code on CFO.com that got me half way there. It protects all the spreadsheets, but it does not password protect the macro itself, meaning that anybody can step into the macro and unlock everything at the click of a button.

The code looks like this.

VB:
Sub ProtectAllSheets()
For Each ws In ActiveWorkbook.Worksheets
ws.Protect Password:="secret123"
Next ws
MsgBox "All Worksheets Protected"

[Code] ....

What can I do to prevent people from stepping into the macro, or prompt a password to actually use the macro itself?

View 1 Replies View Related

Password Protect 4 Sheets Out Of 6 To Restrict Access

Mar 20, 2013

I have a workbook with 6 tabs. The workbook is designed to be shared but I want to password protect the last 4 sheets so that they can only be accessed by certain people. The people who have access need to be able to edit the sheet.

View 8 Replies View Related

Protect Unprotected Sheets With Password And Sort

May 13, 2014

I have the following code (provided here some years ago) which works fine. But I now need to modify it to include an optional password and to allow sort of unprotected cells on manually chosen sheets.

[Code] ....

View 5 Replies View Related

Amend Current Macro To Protect All Sheets...

Mar 4, 2007

I have a Macro to protect all the Months sheets in my Time sheet to stop users deleting formulas, This year I've added a new sheet with a yearly calender so users can track Hols etc but when I run the Macro it protects this sheet "2007-2008". How can I amend the Macro so it protect all sheets except "2007-2008". My Macro is below:

Sub ProtectAll()
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Protect Password:="KITCHENsink19591968", DrawingObjects:=True, Contents:=True, Scenarios:=False
Next ws
ActiveWorkbook.Protect Password:="KITCHENsink19591968", Structure:=True, Windows:=False
Application.ScreenUpdating = True
End Sub

View 4 Replies View Related

Choose Sheets That Save Or Don't Save

Jun 4, 2007

I have 120 sheets in my workbook and I only need 5 of them to save when there are changes, the other 115 are were data is pulled from. Is it possible to tell excel not to look at a sheet when it saves? I'm just after making it save faster.
This is going to be a workbook that " moves" a round a lot, so I want to the 115 sheets in the same workbook.

View 4 Replies View Related

How To Protect Cells/columns In Multiple Sheets In A Workbook

Sep 9, 2009

I'm trying to protect the contents of columns in multiple sheets in a workbook. I've tried to group the columns ( - months, i.e. sept, oct, nov 09 through to march 10) but when I go to Protection options the 'sheet' protection option is not available, all I can do is protect or unprotect the entire workbook.

I've also tried to protect the workbook, but individually set the specific columns in each sheet to be protected (repetitious but seemingly unavoidable), but this doesn't work well either as there's now a mix of a protected workbook and protected columns, both with individually set passwords to unprotect... which seems a bit silly.

There must be a way around this? - the columns are H, J, K and L, and the entire contents of the summary sheet '2009-10 Financial Year'... basically I'd like to be able to protect all of the contents of all of the cells here, ideally just with one password.

View 9 Replies View Related

Excel 2013 :: Speed Protect / Unprotect Sheets

Apr 29, 2014

I experience it takes a lot of time to protect/unprotect sheets in Excel 2013. However, only if the operation is made WITH PASSWORD. This was not the case in Excel 2007. Operation was fast independent with/witout password.

In attached file I have made an example where the time to protect/unprotect 25 sheets is investigated. Can make the test in Excel2013 to double check it is not my computer causing the time delay.

Result test - 25 sheets:
Protect - No password: 0,02 s
Unprotect - No password: 0,06 s
Protect - With password: 6,9 s
Unprotect - With password: 6,9 s

View 7 Replies View Related

Enable Macro & EnableEvents Problem To Protect Sheets

Mar 21, 2007

I am trying to crack away to protect my workbook, by forcing users the enable macros on launching.

What I am trying to do is if Workbook_BeforeSave runs a routine called DoIt. This calls HideAll, saves, then calls ShowAll al whilst not updating. (ie so the user is non the wiser and the computer does not asked to save again if no changes are made).

The reason I am trying this is so that if the user closes the document, it will not ask them again to save. Instead it has preserved the state in the HideAll place (ie all important worksheets are VeryHidden.

It is only by enabling Macros on open can the ShowAll make them visible again.

Below is the code I am using and it works, except it seems the Application.EnableEvents = False in the DoIt macro does not seem to be doing what it should.

very dearly love to get an answer as it is driving me up the wall!

Module 1:

Public bIsClosing As Boolean
Dim wsSheet As Worksheet

Sub HideAll()
Application.ScreenUpdating = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.Name = "Warning" Or wsSheet.Name = "Authorise" Then
wsSheet.Visible = xlSheetVisible
Else
wsSheet.Visible = xlSheetVeryHidden
End If
Next wsSheet
Application.ScreenUpdating = True...............................

View 9 Replies View Related

Change VBA To Password Protect All Sheets To Allow User To Select Protected

Apr 8, 2009

I need to change VBA to Password Protect all sheets to allow user to select protected. I have:

View 2 Replies View Related

Protect And Unprotect All Sheets And Workbook Using Userform Interface And Password

Jul 6, 2012

I am trying to create a way to protect and unprotect all sheets and the worbook by means of a Userform pop up interface.

I have managed to create the Userform but what the code will look like and where to place the VBA code that will make it work, Also i would like to automatically save the sheet/s as i switch between them. so that any updates made to the sheet will be automatically saved when i move to the next sheet and also when i protect or close the workbook.

View 3 Replies View Related

Excel 2003 :: Unprotect And Protect Multiple Works Sheets With Macro?

Feb 25, 2008

I have an annual leave (vacation) work book with a summary page work sheet and separate work sheets for each month i.e. Jan, Feb, Mar.....to......Dec. In order to protect the formulas I have protected them by allowing only access to the input cells on each work sheet and the protect each work sheet.

When someone either joins or leaves the team I have to manually unprotect each sheet and protect again when I have completed the amendments to each of the 13 tabs.

macro code I would need to unprotect all the works sheets in one go (as I use the same password for all the sheets) and reset the passwords (protect) the sheets with more macro code.

I will be running the two macros from my own personal.xls file and ideally they would be fully automatic i.e. I would not need to input the passwords in to unlock or lock the work sheets as the password would be written in the code already

Excel version 2003

View 3 Replies View Related

Excel 2007 :: Hide Sheets On Opening And Password Protect Viewing

Nov 1, 2009

I have an Excel 2007 workbook which has five sheets in. I just wondered whether it is possible to hide all five of them when the workbook is first opened. Also I would like the user to be asked for a password when they wish to unhide a sheet, with the password being different for each of the sheets.

Is there also a way to do this which won't be affected by Excel disabling all Macros when the application initially opens.

View 6 Replies View Related

Password Protect Columns - Hide And Protect Ability To Unhide

Jan 17, 2013

Some sensitive data is held on worksheets that are used by people that do not have access to see the data.

It would be most convenient to keep the data in these worksheets but hide it from view of the users.

Is there a way to password protect a users ability to unhide a column?

View 2 Replies View Related

Save As And Printout All Sheets

Apr 15, 2009

I wanted to make a macro that saved my worksheet, then printed all the different tabs. The save is, of course, easy. Printing all tabs is being more difficult.

I tried to use the macro recorder, but all it did was select range, and then name each tab.
My tab names change though, so I need something that will just select all tabs.

View 6 Replies View Related

VBA To Delete Sheets When Save As

Aug 26, 2008

I have plenty of sheets in my spreadsheet but I need some of the sheets to be deleted before it can be sent to client due to sensitive data. Just to be proactive, some time I may not delete the sheet/s before I send it to client...and that means I am fired from my job.

How is it possible that before I save as my master spreadsheet, excel deletes some of the sheets (Names: "Cost", "Contacts","Vendor"), etc.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved