I would like to lock some collumns and yet change the formating on the unlocked cells mi other columns. Is there another way to protect cells other than locking cells and then protecting the worksheet?
I have a file that's about 50 000 rows long, and 4 collumns wide. And this whould work just fine, but I would not like to print a little over 700 pages... So now I've tried to change the sheet so that I could get 9 collumns on every page (insted of 4). So that I could get two of the old pages on one page (with one empty row between them... It's hard to explain but here is a little ASCII pic that might give you a hint. OLD (about 700 pages): | | | | | | | | | | | | | | | |
(Both "pictures" are just one page) (the "-" are the empty row) I can not take the second half of the rows and paste them beside the first half of the rows...
Is there a way to just protect just a single cell, in order to lock & hide a formula within that cell, without having to password protect the whole worksheet?
I have users filling in data in columns C and D, I need a macro which will select everything entered and lock those cells - well the catch is, if both columns have data. If column C or D are empty I need that row to remain unlocked. No sorting can occur as well.
I am working on both MS Office 2003 and 2007. I am currently working some formulas on the worksheet which I would like to be protected. Therefore I would like some cells in the sheet to be protected and therefore only the person knowing the password (administrator) will be able to change.
I have a spreadsheet with about 2000 lines of vba code. My application needs to be protected so users don't mess themselves up; however, I really only needs the contents of cells to be protected. I have many macros that run, and in order to do this I need to unprotect and re-protect the worksheets. My problem is this: when I re-protect the worksheets, everything is locked up. I would like to allow users to change column widths, hide and un-hide rows, etc. I can't find the parameters needed to do this more controlled type of locking. Is there a list somewhere of all the parameters that can be passed to the Protect method? Here is my current subroutine:
Sub ProtectSheets() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ws.Protect Password:="password" Next End Sub
How can I password protect a certain range of cells (titled 'list'), that when someone tries to edit them, a password dialogue box appears, saying only bob can edit these cells please enter password
I have a shared workbook is it at all possible to leave the cells unprotected so a user can enter data but prevent cells from being formated
for instance someone on night shift with nothing better to do has decided that black text on a white background is boring and changes it frequently to a rainbow of colors. and text types it is making a well laid out and good sheet look like something a child has done I would pursue this down a discipline line but it has proved impossible to nail down the culprit from the many users
A1 is number of days available this sheet goes to a routing recepient from me who fills A2 and B2. C2 and D2 are calculated. A2 has starting date B2 has ending date C2 is days between these two dates D2 is number of days left i.e. A1-C2
I want to lock and protect cells A2,B2,C2 and D2 so that these cannot be changed when I route it back to get next set of dates to be filled by the same person.
I have a spreadsheet where I need to lock certain cells, only problem is this then takes away the ability to filter the columns which I also still need in that spreadsheet.
Is there a way to lock cells so that they can not be edited but also keep the filtering function?
I have a spreadsheet that i use as a log for recording when certain tasks have been completed.
Each worksheet in the workbook represents one month. Within each month, there are monthly tasks and weekly tasks. Currently i manually unlock the relevant weekly cells at the beginning of each week, and lock them again at the start of the next week. Similarly with the monthly task cells.
Is there a way for Excel to automatically unlock the relevant cells based on date so i don't have to go through this task at the start of every week and every month?
I have certain cells in my spreadsheet that contain formulas linking them with other sheets within my workbook. I have grouped sets of rows in my first 2 sheets (to show just headings and to expand to subheadings & details). When I try protect the cells with formulas on the sheet then it blocks me from expanding or contracting the row groups.
Is there an easier way to stop someone editing or deleting the data in my cells? There are about 2 dozen cells with formulas in my first sheet that need protecting - unfortunately not in any particular order...
I've found many resources that tell me how to allow for the insertion/editing of comments within a protected worksheet. When I protect the worksheet, I can select "Edit objects" to allow anyone to insert comments.
However, my issue is that I'd like the Insert/Edit comment functionality to require a password, and this happens to be the opposite of what those resources instruct. I also want the content in those same cells to be editable by anyone.
I have a worksheet from which I regularly clear all contents by selecting all the rows and selecting 'Clear Contents' from the right button menu. However, I now have added a formula in Col Y that I want to protect. I know I could select all columns up thru X, but that would clear the R1 headers, so I want to avoid doing that. I can always work around, but I'm curious, is there a way to clear only values and thus protect the formulas when using the Clear Contents command?
I'm using the code below to lock certain cells depending on the value of other cells. The code below deals with one line of my spreadsheet only and as the spreadsheet comprises 38 data entry rows I've repeated this code 38 times in the worksheet module with the appropriate changes to row numbers.
It works, but causes much screen flickering and "thinking". I'm new to vba so no doubt I've made this code too extensive or lengthy or whatever (or just plain wrong).
Can anyone assist with suggestions on how to simplify the code and/or help with code to handle all 38 lines without repeating the routine 38 times?
I am trying to lock the unused cells in 32, 2 column by 7 row named ranges, based on whether or not two cells, above each range are equal or less than each other. In other words while one of the cells is less than or equal to the second cell all cells in the range below should be unlocked, as soon as that condition is no longer true the blank cells need to be locked.
I am trying to use this in the Workbook_Sheetcalculate so that the macro will run automatically.
I am aware of setting protection to certain cells by the Excel Options. which is unlocking the by defalut locked cells and then setting the sheet protect in tools->protection. I want this to be done through VBA code.
i have a template which has text in some cells and some cells are blank, i need to lock the cells which has text and keep the blank cells unlocked for user input. As this is a template it will be copied to another sheet, so i need to retain the protection properties in all new sheets (copied from the template). Attaching the template for which the protection needs to be done.As of now the sheet1 has protection property set through the toolbar properties.
I use the attached workbook to keep tack of feed use in turkeys. when a new flock is added to a farm (Airport View or Home farm) A template is copied and pasted from the "templates" sheet depending on what type of diet they will be on. (Ralco ABF or Ralco Standard) that template refers to the Ration sheet to calculate how much corn is in each diet. After a flock is complete I will never change the numbers again, it is just for record keeping. I want to be able to change the Corn/ton numbers in a ration (on the rations tab) if need be and not affect all the older completed records.
I have used the following code to lock cells when saving.
I need to exclude Cell B2 when saving
let me know what changes i should make.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) if ActiveSheet.Name = "Summary" Then On Error Resume Next 'Resume to next line if any error occurs Dim Cell As Range With ActiveSheet 'first of all unprotect the entire 'sheet and unlock all cells .Unprotect Password:="pw"
I am assigned to a very tedious task which requires me to lock selectively, cells from Jan through to Dec. Instead clicking the cells and selecting the various options from the menu bar, I would like to do it the other way.
If I want to go locking a cell upon selecting it, what are the VB codings?
I am trying to get user to enter month and goto sheet named the month they enter. I would also like to tag on the end of each one a 1,2,3,4 as I have four sheets four each month. Jan1, Jan2, Jan3, Jan4 etc..
Sub Cell() Dim InptPass As String Dim Pass As String Dim month As String Pass = "mypassword" InptPass = InputBox("Please Enter Password") If InptPass <> Pass Then MsgBox "Incorrect Password", vbCritical Exit Sub Else month = InputBox("Enter Month to Lock") month1.Activate ActiveSheet.Range("A1:BK22").Locked = True MsgBox "Cells Locked", vbInformation End If End Sub
I've got a spreadsheet set up for a simple barcode scanning system. The user scans the barcode of the product when complete, and it logs it to a sheet along with a date & time timestamp. I'm then planning to use a v-lookup (barcode to product name) & pivot-table to count instances of 'product name' so that I can monitor what is being produced easier, nothing too tricky.
The problem I'm having comes from the products of the same spec having the same barcode, so data validation is hard to apply, as I can't 'not allow dupes' - the concern I have is that if the user unknowingly (or knowingly!) scans the same ticket twice, I think I've got 2 of a product when I've only got one. The idea I had was to lock all cells for a set time period (say 1 minute) after an entry so that it couldn't be accidentally scanned twice.
I want to copy a formula and want to lock a certain column, just like you use the dollar signs in normal formulas. Because the data in tables can't be locked with dollar signs.
I finally have the merged cells resizing the way I need, however it seems to lock the cell after the process not allowing it to be edited again until I unlock the sheet. below is the current code I am using