Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
I am protecting a sheet that has macro, my sheet fives macro error. But when I unprotect the sheet and run the sheet, there is no error. Please advise. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
is the macro altering any of the locked cells on the protected sheet ?
"ub" wrote: Hi I am protecting a sheet that has macro, my sheet fives macro error. But when I unprotect the sheet and run the sheet, there is no error. Please advise. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes, it does alter the locked cells
"Terry" wrote: is the macro altering any of the locked cells on the protected sheet ? "ub" wrote: Hi I am protecting a sheet that has macro, my sheet fives macro error. But when I unprotect the sheet and run the sheet, there is no error. Please advise. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You could try the tools menu then protection and then the protect sheet tab,
it gives a list of things that it will allow to do on a protected sheet if your macros preform and of those just put a tick in the box, otherwise all i can think of is to unlock the cells that are being altered. "ub" wrote: Yes, it does alter the locked cells "Terry" wrote: is the macro altering any of the locked cells on the protected sheet ? "ub" wrote: Hi I am protecting a sheet that has macro, my sheet fives macro error. But when I unprotect the sheet and run the sheet, there is no error. Please advise. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Change your macro to unprotect, run the routine then re-protect.
Sub runit() ActiveSheet.Unprotect Password:="justme" your code runs here ActiveSheet.Protect Password:="justme" End Sub Gord Dibben MS Excel MVP On Fri, 5 Oct 2007 12:08:04 -0700, ub wrote: Yes, it does alter the locked cells "Terry" wrote: is the macro altering any of the locked cells on the protected sheet ? "ub" wrote: Hi I am protecting a sheet that has macro, my sheet fives macro error. But when I unprotect the sheet and run the sheet, there is no error. Please advise. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
If you include "ActiveSheet.Protect UserInterfaceOnly:=True" in your code, you can keep the sheet protected while still allowing the macro to alter the sheet. Hope this helps, JP On Oct 5, 3:01 pm, ub wrote: Hi I am protecting a sheet that has macro, my sheet fives macro error. But when I unprotect the sheet and run the sheet, there is no error. Please advise. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protecting a macro | Excel Discussion (Misc queries) | |||
Can't use tab after protecting sheet. | Excel Worksheet Functions | |||
Protecting Sheet | Excel Worksheet Functions | |||
macro for Protecting a Sheet | Excel Discussion (Misc queries) | |||
Can't use tab after protecting sheet. | Excel Discussion (Misc queries) |