I have macros that I use in my PERSONAL.XLSB to protect/unprotect all sheets.
My unprotect sheets macro is:
[Code] .....
Some of my workbooks have many sheets, but have different passwords.
What I would like to change is, instead of the "One or more worksheets could not be unprotected". I'd like to have the msg box show a list with the names of the worksheets that couldn't be unprotected.
Option Explicit Sub copypaste() Dim lastrow As Long, i As Long, j As Long, sheetlist As Long Dim ws As Long
[Code]....
i just wanna execute this coding from particular tab to particular tab (in detail to say- if am giving from and to tab as A & D, then coding should be executed to A, B, C and D alone, and remaining should remains as is).
I have a button, and I need a Macro that will cause it to clear all unprotected cells. I think I can figure out how to get it to clear an individual cell, and I suppose I could enter every cell I want cleared individually...but that might take awhile.
Is there a way to set up a Macro that will delete the contents of every unprotected cell? I guess I haven't tried it yet - if I protect the cells, will it not delete those? Also, there is a small image - I don't want that deleted either.
I need to know if it is possible for a macro to run if a specific worksheet is unprotected?
For example, if someone takes off the protection to my costings sheet either through VBA or finding out the password, i want Excel to run a certain macro if possible?
I have a spreadsheet that has I have protected. On this sheet I have a button labeled Reset Form. When you click the button it it goes to each Unprotected Cell and deltes the contents. I created this by starting the macro and then tabbing to each and every cell and deleteing the contents I then ended the macro...
Is there a code that I can use for to clear all unprotected cells as opposed to creating the macro manually?
I am working on a worksheet that has been protected off and on. I unprotected this AM, but XL will not allow changes and instructs to unprotect the WS, but it is already unprotected. The WB is not protected and never was. I am at a loss as to how to work around this problem.
I have created an Excel template for others to use. They can enter data in certain unprotected cells and the data is linked to other places in the workbook. If they Cut and Paste something in the unprotected cells, the formulas get a REF#. There is no problem if they Copy and Paste. How can I prevent the REF# error without resorting to VBA?
I'm currently using a vba script to unprotect all of my worksheets within my workbook in order to refresh the pivots and then protect them again once the pivots are completed, but there are two worksheets I would like to remain unprotected in order for users to be able to edit them after the pivots have been refreshed. Now I've tried adding a sub code in order to unprotect one of the sheets as a test to see if it will allow me to edit the worksheet after I update the pivots. Unfortunately the coding isn't working, and the worksheet is still remaining in protect mode. Here's the code I am using to protect the worksheets when refreshing the pivot as well as the code I am attempting to use in order to unprotect the one worksheet.
The Special GoTo function doesn't have a listing for highlighting (going to) only protected or (preferribly) unprotected cells. Is there an easy way to do this?
I Need to protect some cells from being Changed or deleted, if i protect the whole sheet there are some cells that need to be changed using the formatting bar I.e borders, colours, font- colour, Merged cells.
the protection setting allows you to leave individual cells unprotected however you still cannot change the border for example.
Excel 2007 or 2003 Is there code to be able choose the formating of a cell when right clicked if the cell is Unprotected. But, the sheet is Protect and the Workbook is Protected. Without Unprotecting anything 1st.
The reason being is sometimes the user may need to change the type of font from Arial, or Gdt or Y14.5M.
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.
I have a file used by numerous facilties. I would like code to track any time a protected sheet has been unprotected / protected. I would also like the stamp to show the user data if that can be done.
I have a worksheet that has headings along the and summary stats down the right and bottom of an area where details can be entered.
Depending on a persons user name columns are hidden/visible so that they can only enter information relevant to their section. The workbook is also shared.
What I want to do is stop people from being able to overwrite the headings or formula that calculate the stats but as the workbook is shared and the VBA that hides/unhides the columns needs the sheet to unprotected I am having to use code to prevent this: ....
Is it possible to adjust column width of a PW protected worksheet without unprotecting it, or unprotect it and adjust in background then PW protect it?
On sheet1 H1 = column width value Will adjust Sheet2 (password protected) column E width
Using excel 2003, Workbook has several sheets, all sheets are protected workbook is not. I have my cells containing formulas locked, I have unlocked the other cells that require input of various data. When the user goes to type in a "unlocked" cell, (to over write the now obsolete data) it will not allow the user to delete the data, the curser remains a cross and the formula bar or the cell itself will now allow any changes.
I have double checked that the cells are unlocked. I can enter data after the last entry in the unlocked row and or column, but I want to be able to "cut or delete the data that is no longer need and begin entering data from the beginning cell of choice. I want to copy this "old" data to an archive sheet, but it will now allow me to select it.
Example: I have 6 columns starting, (a to f) the formulas are in columns e and f and start at row 4 These columns are locked and hidden. Columns a,b,c and d are unlocked for user input. All data is started from A5 which I want it to start from each time the old data is deleted and new data entered. If I place my curser on any of the cells in the e and f rows, the cursor remains a cross which is what I expect it to do, but columns a to d are doing the same thing, they are acting as if they are locked OR atleast those cells in the a to d areas which have existing data, as I can enter below.
I have unprotected cells in excel where I need to change the content (number) and cell color, but I don't want the cell borders to change. I'm a beginner with vba. I've tried protect sheet and workbook options, but looks like I need a vba code and don't know where to start.
I'm trying to change a cell in a 2007 workbook but I'm getting this message:
"the cell or chart that you are trying to change is protected and therefore read only. To modify a protected cell or chart first remove the protection using the unprotect sheet command (review tab, changes group) you may be prompted for a password."
However, the unprotect button on the changes group tab is greyed out (the protect button is available though). The workbook isn't password protected and I'm not being asked for a password. What am I missing?
I have got a worksheet wherein Column A contains the Customer Code, & Column B contains the Customer name. I want to create new worksheets based on the Customer Codes in Column A i.e for each Customer Code, new worksheet should be created wherein I would later on enter some formatting & data in the worksheets. When I select Delete worksheets, all the work sheets other than the 1st worksheet should be deleted.
Is it possible to sort numerous worksheets based off a list of cells that are the names of the worksheets within the same file? For example my worksheet names are:
YTD Texas YTD Florida Period Texas Period Florida
I can sort the sheets by alpha but it puts the two YTD worksheets together when I need the two Texas sheets side by side (I need this on a file that contains over 100 worksheets otherwise I would do it manually) I was wondering if I could create my order of sheet name in another worksheet and reference that list through vba code?
I have a template worksheet that I would like to copy and name according to a list that I have. Currently there are 57 objects (lack of a better word) in the list.
This is what I have currently.
Sub CreateWorksheets() ' ' Macro1 Macro ' Macro recorded 7/8/2008 by amkgri '
' Dim ws As Worksheet Dim Y As Long Dim I As Long
Y = ActiveCell.FormulaR1C1 = "=+COUNTA('Sales Managers'!C[1])-2" For I = 2 To Y
Worksheets("Template").Copy Worksheets(Worksheets.Count) ws.Name = I Next I End Sub
But it is currently not doing anything. I borrowed some of the code from another thread that is how I got this "far"....
The reason -2 is that the first row is column labels and the last row is my Template.
So I am wanting to start with the second row and continue until one row from the end.
The list of names that I am wanting to use is basically the list of states.
I am using excel to create an equipment list for a job. The equipment broken down into several categories spread over 8 work sheets in the same workbook. Each worksheet has a quantity column in A and Equipment Item in Column B. Each job doesn’t require all the equipment at one time so as I need a piece of equipment for the job I am working on I place a quantity (column A) next to the Equipment Item (B).
My Problem is that I want to create a Final equipment list in a new work sheet and I am finding it hard to create a formula which will look at each of the 8 worksheets and when it finds a number not a blank in the quantity column A to the carry both the Quantity A and Equipment Item B data into the Final equipment list worksheet. Once it has done this carry on scanning through the worksheet to find the next item thus compiling the final list.
I have around 40 to 50 worksheets in a workbook. Is there a quick way of listing the names of all the worksheets in a single worksheet instead of typing the sheet names one by one?
I have a workbook with multiple worksheets that will be added or removed. I want a list of all worksheets (which I plan on making hyperlinks) on the first worksheet. (entitled "Home"). This page is automatically selected on worksheet open. In pseudocode, I want a:
<for each worksheet in the workbook> <list name of worksheet> <advance one row>
OK - so that was even less than pseudocode, it's a quickie outline... But the idea is present.
I am trying to perform certain actions on just some worksheets in a workbook. I realize this is probably a simple thing, but I've been unsuccessful in my search of the web so far.
What I'd like to do is define the worksheets (i.e. "in worksheets" below) in the below code to only include a list of worksheet names (which I can provide - ideally via a list in the worksheet in Excel, say in cells A1:A15 of a tab called "Tab List".).
I have a text data stored in same cell of different worksheets on the same file. I need to list them down in a single fresh worksheet. Is there any formula or any way that I may use?
I have the below code that sorts a list of Doors that I have in row C17 downwards. Door 54, Door 7, Door 109 etc. The list is feeding a drop down box, people find the door they were looking for, in the said drop down box.
Code:
Sub ListSorter() Dim LastRow As Long LastRow = Range("C" & Rows.Count).End(xlUp).row
[Code]....
I wondered if there was some code I could add to the end of this, that would the sort worksheets, which are all named after each cell in the list, in the same order.