Unprotect, do the sort then reprotect.
Sub foo()
ActiveSheet.Unprotect Password:="pword"
''your sort code
ActiveSheet.Protect Password:="pword"
End Sub
Sub hide()
ActiveSheet.Range("G:AB,DR:FQ").EntireColumn.Hidden = True
End Sub
>Hi,
>I have a protected sheet with password say "1122"
[quoted text clipped - 12 lines]
>What code do I need to hide 2 groups of columns:
>DR:FQ and G:AB
Khalil Handal - 21 Aug 2007 02:53 GMT
Thanks,
It worked fine.
> Unprotect, do the sort then reprotect.
>
[quoted text clipped - 26 lines]
>>What code do I need to hide 2 groups of columns:
>>DR:FQ and G:AB