Protection Interferes With Formula

Jul 14, 2007

I have a small piece of code which runs without protection but won't create the data validation list if protection is enabled:

Sub WorkSheet_Activate()
ActiveSheet. Protect UserInterfaceOnly:=True
End Sub

The code is:

Private Sub EqOther()
Cells(6, 9) = ""
Cells(6, 10) = ""
Range("i6").Select
With Selection.Validation
.Delete..................

View 3 Replies


ADVERTISEMENT

Custom Format Interferes With Itself

Aug 8, 2006

I have a custom format that is applied to column AU. Here is the worksheet code which is placed in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column <> 47 Then Exit Sub
If Target.Value = "" Then Exit Sub
On Error Goto Errhndl
Application.EnableEvents = False
Target.Value = "Map " & UCase(Left(Target.Value, 4)) & " <" & UCase(Mid(Target.Value, 5, 2)) & "-" & Right(Target.Value, 2) & ">"
Application.EnableEvents = True
Exit Sub

Errhndl:
Application.EnableEvents = True

End Sub


It works well on the sheet, if I remember to only put three numbers, three letters and then two more numbers (allwithout any spaces. Lowewr case ok). (eg. 122rmm25 is then transformed into Map 122R <MM-25>). On the sheet this works. Coming off of the UserForm, it tries to apply this format to text already formated and messes up royally!!!

Is there any way to either reverse this proccess coming off the UserForm or to stop the worksheet from appling this format to the value of the cell in question if the source is in the wrong format to be changed? How do I detect what format the text is in? (Raw, formatted correctly or over formatted)

View 2 Replies View Related

Formula Protection For Cell Entry

Feb 11, 2004

I'm trying to set a cell so that it has a certain value based on other cell(s) information. I can put a formula into the cell to do that, but I also want to make the cell available for user input, preserving the formula should the user change their mind and delete their input.

Basically, it's a cell with a protected formula that can be overridden with user input, then if the user decides to take their input back out, the formula kicks back in.

View 9 Replies View Related

Stop Formula Viewing Without Protection

Dec 13, 2006

I am looking for the code to keep certain cells from being rested on, they can be clicked on but in order for you to view the formula in the cell you have to hold down the mouse button otherwise it will move you over to the cell next to it. I was using another worksheet a while ago and was trying to view the formulas but when I clicked on the cells holding them it would move me to the next cell, the only way I could view them was to hold the mouse button down as soon as I would release it it would be gone! I do not want to protect the sheet, if there is another way to hide formulas I am open to all ideas!

View 4 Replies View Related

Stop Deleting Formula Cells Without Worksheet Protection

Sep 12, 2006

I'm protecting a spreadsheet with Excel 2000. For that i used the Excel functionality : Data -> " Validation"

Unfortunately, I can not protect the all sheet or workbook (Requirement). So even if the cells are protected by "Validation", any user can delete the cells using the key DELETE or BACKSPACE on the keyboard !

VBA Macro (which could be activate at each change on the sheet for example...) ? or if it's possible to avoid cells deleting with the "Validation" in the Excel Data menu ?

If it's a macro, it would do :

1 ) see if a user is pushing DELETE or BACKSPACE on the keyboard

2 ) see if the cell contains formulas

3 ) if yes, make a box appears to say that is not possible to delete this cell

4 ) return on the Excel sheet without changes

View 9 Replies View Related

Run-time Error '50289' :: Project Protection / Module Protection / Module Visibility

Aug 18, 2004

I recieve an error :

Run-time error '50289':
Can't perform operation since the project is protected.

When i try and run my code.

The code does add parts to modules and workbook events, but I need the code to be protected.

View 9 Replies View Related

Windows Cut And Paste Interferes W/macro Cut And Paste

Oct 26, 2007

I have a macro that does lots of cutting and pasting, and to make sure it can run without interference from my normal work, I did add the line Application.Interactive = False. But seems while I am cutting and pasting in other windows while the macro runs, sometimes it crashes on the paste part. Is the macro and the Windows Operating system sharing the clipboard?

FYI, Windows XP professional, Excel2000.

View 9 Replies View Related

VBA Protection

Mar 22, 2009

I have a macro that copies the contents of a cell, and pastes it into the the first blank cell of a range. Its important that the entire sheet is protected, but the macro won't allow the paste function because of the protection.

Is there a VBA code to unprotect the sheet, run the copy/paste macro, then protect the sheet again. THe problem is I would prefer the protection to use a password, as I don't want the user to simply unprotect the sheet from the menu bar.

View 9 Replies View Related

Set Protection Using VBA

Aug 10, 2006

I tried the following code and it doesn't work:

Sub Macro2()
Cells.Select
Selection.Locked = True
Selection.FormulaHidden = False
Range(Range("A" & Rows.Count).End(xlUp).Row & "A300").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("AE11:AG300").Select
Selection.Locked = False
Selection.FormulaHidden = False
End Sub

I want to be able to unlock all cells after the last cell that has data in column A down to row 300. Also need to unlock cells AE11:AG300. What's wrong with my code?

View 5 Replies View Related

Column Protection

Nov 1, 2008

I have a worksheet where there are a few columns. The columns involved in my problem is Column A and B. So the users open the worksheet and they change the values of column A. Column B has a vlookup formula and if the value of column A is changed than column B automatically changes its value as well (vlookup).

My problem is that the users of this file are not experienced computer peoples so, sometimes (by accident) they change the value of column B (deleting the formula). I tried to set the protection for column B.... but then it will not allow any change (vlookup will not work) to the cells in column B. So my question is that how can I allow the users to see the values in column B but not to edit it..and also let excel to let the formula to change the values of column B (if column A value is changed)?

View 2 Replies View Related

Cell Protection

Nov 5, 2008

is there a way that i can stop people being able to edit certain cell in a sheet but still allow them to type in other cells as when i have tried diffrent ways it locks the whole sheet

View 5 Replies View Related

Simultaneous Protection

Dec 18, 2009

I have set up a workbook containing 15 sheets. 12 of them are named Jan to Dec. I KNOW how to protect each one, but is it possible to protect all twelve in one go?

View 9 Replies View Related

Worksheet Protection When Using VBA

May 2, 2007

I have a worksheet that I want to protect, but when I use the protect worksheet command on the tools menu, it renders all of my VBA useless.

View 11 Replies View Related

VB/Macro Protection

Oct 8, 2008

I know how to protect VB code (e.g. Protection tab of VBAProjectProperties), however I would like to know how to embed code to stop the user from accessing the Macro (via Run Macro).

I understand you can do this by adding "Private" to the subroutine, however, is there some code I could add into a macro/connecting to a button, that would enable the user to protect the sheet (without needing to manually type private within the Module subroutine)?

View 9 Replies View Related

VBA WorkBook_BeforeSave And Protection

Dec 11, 2008

I'm trying to set a check during the WorkBook_BeforeSave event.

View 4 Replies View Related

VB Project Protection

Feb 12, 2009

I'm trying to protect my project so that others can't unhide a sheet I have tagged as veryhidden within VB.

I followed these steps:
1. Select project in the projects window
2. choose Tools
3. Project Properties
4. Protection tab
5. checked lock porject for viewing
6. entered passwords twice
7. clicked ok and saved

On another file this has worked perfectly as I wanted it to.

However on another very large file with multiple VB projects it is not "taking" on the project I need it to.

I can open the file, the VB project and change the setting on any sheet I need to without entering a password.

View 14 Replies View Related

Macros And Protection ..

May 22, 2006

I have a scoresheet with 60 contestants. Each contestant takes up 7 rows,
the first six of which are hidden to start with and I have put macros in the
adjoining column so that when they are clicked, the full 7 rows open up and
the table of scores can be entered, When entry is complete for that
contestant, a further macro when clicked will close up the 6 rows, leaving
just the main line (line 14) with the No, Name, “OPEN” macro and other Totals
in adjoining columns.

The sheet works fine, but as many people will use this programme, I need to
protect the sheets against mistaken entries etc., and as soon as I protect
it, the macros wont work and throw up a “unable to set the property of a
hidden range class, run time error 1004. I don’t want to leave the sheet
unprotected, can anyone advise me where I am going wrong.

I am also trying to find a way to validate “time taken” entries so that they
can only be input as minutes and seconds in the format of 09.56, within a
range of 00.01 – 10.00. Not having any success with this as it keeps
converting the data into something like a date.

View 9 Replies View Related

Worksheet Protection

Jul 23, 2007

On my worksheet i am using advanced filters to view the data in the sheet.
But when I protect the sheet they do not work, I have unlocked those particular cells (Row 1). But it still does not allow the use of the advanced filter when the sheet protection is on.

View 9 Replies View Related

Password Protection

Aug 28, 2007

I use the following piece of code to show/hide certain worksheets in a workbook. To access the hidden sheets, a command button runs the code. It works very well, except that the password is openly displayed in the message box (as opposed to returning asterisks for the typed characters).

Sub togglesheets()
Dim Ws As Worksheet
Dim strPassword As String
strPassword = InputBox("Enter Password")
If strPassword "Password" Then MsgBox "Wrong Password": Exit Sub
Application.ScreenUpdating = False
For Each Ws In ActiveWorkbook.Worksheets
If Ws.Name = "Apr-Sep" And Ws.Visible = xlSheetVisible Then
Ws.Visible = xlSheetVeryHidden

ElseIf Ws.Name = "Apr-Sep" And Ws.Visible = xlSheetVeryHidden Then
Ws.Visible = xlSheetVisible
End If..............

View 9 Replies View Related

Protection Of A Different Sort

Jan 22, 2008

This is something someone asked me and told me it's possible without VBA. I don't know if it is. I'm sure if it is possible, someone here would definitely know!

I have workbook, which I can not protect. It's sort of a template, so is used again and again with different data. It's accessible to many users. However, I don't want any changes in that workbook once it is closed.

For example, a user opens the workbook, he makes changes in the data, takes the outputs and uses it somewhere else. Now, when he closes it, it should revert back to the same as it was when it was opened. Even if the user saves it and closes, it should remain the same.

View 9 Replies View Related

Auditing Protection

May 21, 2008

Is there a function of formula in Excel that will show me which cells are protected. I have a worksheet that needs certain cells to be protected. I don't know how i can get on good look to see if the are all protected.

Is there a conditional formatting formula possible.

View 9 Replies View Related

Proper Protection

May 27, 2008

Is there any way I can protect my sheets properly..? I know you can use Tools > Protection.. but I've found (and used, for good, not evil!) macros on the web that will crack these in seconds. Is there any way I can disable the 'Tools' menu so that other users can't load these password crackers?

View 9 Replies View Related

Macros And Protection

Jul 3, 2008

I have a excel Workbook, 6 sheets and many calculations with formulas and macros.

Is there a way to protect this workbook to be able to insert data only in the correct cells, I tried but the macros does not work, they are essentially copy and paste.

there will be 3 sheets with reports to be printed too.

View 9 Replies View Related

Protection Not Quite Protecting

Jul 24, 2008

I have a workbook and i have spent time protecting all the formula cells and allowing user to only be able to select unlocked cells (so they can quickly tab to where they need to input info).

I have lots of codes running and always use Activesheet=unprotect If i am modifying protected cells and then at the end of the code i put back the activesheet=protect.

HOWEVER

When i transfer this book to another machine or to someone else to run it on their machine - ALL of my protection GOES OUT THE WINDOW

Also - is there a way to hide or protect all my code so that users cannot modify it?

If so - how do i get it back to modify state when i want to edit it?

View 9 Replies View Related

Sort Protection

Aug 25, 2008

I have an Excel sheet that I want to distribute
And I do not want the recipients to be able to
Change or sort the data.

I used Tools > Protection >Protect Sheet
(Contents,Objects, Scenarios are checked) >No Passord.
The original sheet cannot be changed or sorted.

But if I Copy and Paste it to a new Excel file
I lose that ability.

How can I fully protect the sheet
So it cannot be changed or sorted if
It is copied and pasted to a new sheet?

View 9 Replies View Related

Pasword Protection

Oct 30, 2008

How do you protect a workbook with a pasword in 2007 ???

View 9 Replies View Related

No Autofilter With Protection On

Dec 18, 2008

It is my understanding that the autofilter should still work on a protected sheet, but despite all of my efforts I have not been able to make this work. I have tried adjusting the settings on the protection to allow filters, formatting, and everything else I could think of all to no avail.

What am I missing here? This is the same on several different spreadsheets that I have put together.

View 9 Replies View Related

Protection Of Sheets

Aug 24, 2009

I have at average 10 sheets in one workbook. I have to protect 9 workbooks.

Can I protect one workbook in one go rather than protecting each sheet in every workbook?

View 9 Replies View Related

Check For Protection

Apr 25, 2006

I'm running a macro on Workbook Opening that checks to see if the sheet is protected, and if it is, unprotect it. I have used the code (simplified):

If Activesheet.Protect = True Then
Activesheet.Unprotect
End If

Unfortunately this seems to protect the sheet if it isn't already protected. Have I used the wrong first line perhaps?

View 3 Replies View Related

File Protection With Vba

Apr 2, 2007

I need to protect excel file. I have search vba codes and tried to combine :
1. Must enable macro on open
2. Input user id and password
3. Disable cut, copy, paste and print
but not work.
user : test
password : 1
Details as per attachment

View 9 Replies View Related







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