This code: With ActiveSheet .Shapes("Rectangle 1").Select Selection.Left = .Columns("P").Left End With -- works fine when protection is turned off, but not when preceded by -- With ActiveSheet .EnableSelection = xlUnlockedCells .Protect up vote 1 down vote favorite 2 I'm running a piece of code via the Worksheet_Change Event and I have it working with a call to an unprotect sub at the The default value is True. After that I tried setting a range name for each of the two worksheets. this content
Users can change filter criteria but can not enable or disable an auto filter. The macro appears to work but I still get the error indicating that the spreadsheet is protected when I try and run the ActiveX control. It's very unstable and partially not working. Beauty is in the eye of the beer-holder.
Thanks for any heads-ups! So....before I go changing my macros, I would appreciate knowing what problems and pitfalls I might expect with UIO as opposed to unprotect/protect. The code below unprotects the sheet so that I can set the protection for the range and then re-protects the sheet. I've set it up with userforms and VBA to do the editing and all works fine, until I close and reopen the file, when it's suddenly fully protected!!
If this argument is omitted, protection applies both to macros and to the user interface. No error message; just no effect. Any thoughts? Excel Video Tutorials / Excel Dashboards Reports Reply With Quote Quick Navigation Excel General Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums: Forums Home Forums HELP FORUMS Excel
excel vba excel-vba protection share|improve this question asked Jul 28 '14 at 16:06 Harley B 420312 1 I don't know if there is any documentation as to the limits of Excel Vba Protect Sheet Userinterfaceonly Why (and when) does pattern matching with f[__] perform MUCH more quickly than _f? AllowInsertingRows True allows the user to insert rows on the protected worksheet. Run-time error ‘3000': Cannot use this table functionality on a protected worksheet.
Loading Ozgrid Excel Help & Best Practices Forums
excel vba share|improve this question edited Aug 21 '15 at 19:05 Tunaki 59.1k1891124 asked Jan 4 '13 at 18:07 4 Leave Cover 54761836 Same issue here. news AllowFiltering True allows the user to set filters on the protected worksheet. Forum Board FAQ Forum Rules Guidelines for Forum Use FAQ Forum Actions Mark Forums Read Quick Links Today's Posts Search New Posts Zero Reply Posts Subscribed Threads MrExcel Consulting Advanced Search Music notation software for Ubuntu Using transistor as switch, why is load always on the collector I used a solution that I happened to already have on my laptop on an Unprotect Sheet Vba
If so, is it possible that a user has manually locked it? Thks! So why has Excel decided to present you with this problem? have a peek at these guys The default value is False.
So, is there anything else I could do to accomplish this ? (Protect workbook in excel only, unprotect workbook when macros are enable, and allow changes to be saved..) Thanks ! It now flies. I've tried: Code: ActiveWorkbook.Protect userinterfaceonly:=True I get an error.
And I THINK I'm also seeing a lot of problems reported on this board with the UIO approach. Build me a brick wall! Using the range variable names in the Copy statement, instead of referring directly to the two worksheets, worked correctly. So I took one of my workbooks and striped its worksheet free of protection and then reprotected with the following code.
Unfortunately, for some VBA methods, it's not working. To re-enable the user interface protection after the workbook is opened, you can use the UserInterfaceOnly argument in the Workbook_Open Event wherein it gets enabled in all or the specified worksheets, Ozgrid Retains the Rights to ALL Posts and Threads current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. It works while the sheet is unprotected but when it’s protected, the macro fails (Run-time error 1004) even though protection was set for User Interface Only.
Results 1 to 7 of 7 Thread: Problem with UserInterfaceOnly protecton Thread Tools Show Printable Version Search Thread Advanced Search November 4th, 2004 #1 Russell1981 View Profile View Forum Posts This is a security feature that you can ... query will refresh when not using a password but will not refresh when using a password). I am very frustrated because of this problem.
I guess if that is the only option, then I will need to do this. Your cache administrator is webmaster.