Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have a worksheet which I want users to enter a limited amount of
information and then I have a a couple of macros that sorts it for them. How can I run the macro and still protect the worksheet? Any ideas? |
#2
![]() |
|||
|
|||
![]()
You cannot run a sort macro in a protected sheet, so you have to unprotect,
do the sort, and protect the sheet again. In a similar post, Julie D posted the following: Hi you'll need to uprotect the sheet at the start of the macro and protect it again at the end e.g. sub mymacro() activesheet.unprotect ("pwd") 'current code activesheet.protect ("pwd") end sub where pwd is your password Cheers JulieD "Husker87" wrote: I have a worksheet which I want users to enter a limited amount of information and then I have a a couple of macros that sorts it for them. How can I run the macro and still protect the worksheet? Any ideas? |
#3
![]() |
|||
|
|||
![]()
Husker
The easiest method is to unprotect, run your code then re-protect. Sub Sort_and_stuff() ActiveSheet.Unprotect Password:="justme" 'do your things or call your macros here ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _ Contents:=True, Scenarios:=True End Sub Gord Dibben Excel MVP On Wed, 30 Mar 2005 10:41:06 -0800, "Husker87" wrote: I have a worksheet which I want users to enter a limited amount of information and then I have a a couple of macros that sorts it for them. How can I run the macro and still protect the worksheet? Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Question about sorting in protected worksheet | Excel Worksheet Functions | |||
Protected Worksheet | New Users to Excel | |||
Sorting protected worksheet | Excel Discussion (Misc queries) | |||
Executing macro for all worksheet from a different worksheet | New Users to Excel | |||
How use group and ungroup functions while worksheet is protected | Excel Worksheet Functions |